You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello,
When we use the TError type from codegen, the type is always unknown.
How to have the payload or message of all the 400s and 500s errors typed ?
Thanks
To Reproduce
Steps to reproduce the behavior: npx --package @7nohe/openapi-react-query-codegen openapi-rq -i https://petstore.swagger.io/v2/swagger.json -o src/generated
Facing the same issue, I don't know how to use error message in my returned data with the onError method.
My openapi.yml has definitions for error objects returned on 400 error code and these are picked up in the types.gen.ts file but I don't see how to use them in my mutate hooks.
Describe the bug
Hello,
When we use the
TError
type from codegen, the type is alwaysunknown
.How to have the payload or message of all the 400s and 500s errors typed ?
Thanks
To Reproduce
Steps to reproduce the behavior:
npx --package @7nohe/openapi-react-query-codegen openapi-rq -i https://petstore.swagger.io/v2/swagger.json -o src/generated
OpenAPI spec file
https://petstore.swagger.io/v2/swagger.json
Expected behavior
I need to have the content or message of all the 400s and 500s errors.
Screenshots
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: