Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions docs/rtk-query/api/createApi.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -938,6 +938,15 @@ _(optional, not applicable with `queryFn`)_

[summary](docblock://query/endpointDefinitions.ts?token=EndpointDefinitionWithQuery.rawErrorResponseSchema)

Use `rawErrorResponseSchema` to validate the error value returned by your `baseQuery` **before** `transformErrorResponse` runs.

This is the error-side equivalent of `rawResponseSchema`. If you want to validate the final value that your endpoint exposes after `transformErrorResponse`, use [`errorResponseSchema`](#errorresponseschema) instead.

In practice:

- `rawErrorResponseSchema` validates the original error shape returned from the server or `baseQuery`
- `errorResponseSchema` validates the transformed error shape that ends up in RTK Query's cache and hooks

[examples](docblock://query/endpointDefinitions.ts?token=EndpointDefinitionWithQuery.rawErrorResponseSchema)

#### `metaSchema`
Expand Down
Loading