rametta / rapini

:leafy_green: OpenAPI to React Query (or SWR) & Axios
Apache License 2.0
152 stars 18 forks source link

TError = unknown #15

Closed GaiusValerius closed 1 year ago

GaiusValerius commented 2 years ago

Hi, thank you very much for this great library.

I noticed that you're defining all generics by React-Query but didn't provide AxiosError as TError.

rametta commented 2 years ago

@KennethVeipert Yes, that is a good question. To my understanding it seems like the error could either be Error | AxiosError based on this comment https://github.com/axios/axios/issues/3612#issuecomment-770224236. I encourage you to open a PR with details on the behaviour of the Axios Error type. I can help review the PR