Mirror: The highly customizable and versatile GraphQL client with which you add on features like normalized caching as you grow.
1--- 2title: Errors 3order: 5 4--- 5 6# Error handling 7 8When we use a GraphQL API there are two kinds of errors we may encounter: Network Errors and GraphQL 9Errors from the API. Since it's common to encounter either of them, there's a 10[`CombinedError`](../api/core.md#combinederror) class that can hold and abstract either. 11 12We may encounter a `CombinedError` when using `urql` wherever an `error` may be returned, typically 13in results from the API. The `CombinedError` can have one of two properties that describe what went 14wrong. 15 16- The `networkError` property will contain any error that stopped `urql` from making a network 17 request. 18- The `graphQLErrors` property may be an array that contains [normalized `GraphQLError`s as they 19 were received in the `errors` array from a GraphQL API.](https://graphql.org/graphql-js/error/) 20 21Additionally, the `message` of the error will be generated and combined from the errors for 22debugging purposes. 23 24![Combined errors](../assets/urql-combined-error.png) 25 26It's worth noting that an `error` can coexist and be returned in a successful request alongside 27`data`. This is because in GraphQL a query can have partially failed but still contain some data. 28In that case `CombinedError` will be passed to us with `graphQLErrors`, while `data` may still be 29set.