---
title: "Discussion on \"Proper Error Handling in React Query\" | Hashnode"
description: "Discussion on \"Proper Error Handling in React Query\". ❌ Wrong → Swallowing Errors\nfunction useRepos() {\n  return useQuery({\n    queryKey: ['repos'],\n    queryFn: async () => {\n      try {\n        const response = await fetch('/api/repos')\n        if (!response.ok) throw new Error('Failed')\n        retur..."
url: "https://hashnode.com/posts/proper-error-handling-in-react-query/68695658294a7c79f79de114"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Proper Error Handling in React Query](https://tigerabrodi.blog/proper-error-handling-in-react-query?utm_source=hashnode&utm_medium=feed)

❌ Wrong → Swallowing Errors function useRepos() { return useQuery({ queryKey: \['repos'\], queryFn: async () => { try { const response = await fetch('/api/repos') if (!response.ok) throw new Error('Failed') retur...

Jul 5, 2025 · 2 min read · tigerabrodi.blog  
Read the article

-   [#reactjs](https://hashnode.com/tag/reactjs)

## Written by

[Tiger Abrodi](https://hashnode.com/@tigerabrodi)

@tigerabrodi · Germany

  
[View profile](https://hashnode.com/@tigerabrodi)

Obsessed with crafting software.

Just a guy who loves to write code and watch anime.

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
