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
I am using openapi-zod-client to generate a zodios api, and am trying to use isErrorFromPath to narrow error types. However, I seem to get a never type when attempting to use it (see screenshot).
Workaround
You can work around this by adding an alias and using isErrorFromAlias instead. But this is quite a chore since we are generating the zodios api from an openapi yaml file. Regenerating the zodios api will also result in losing these alias fields.
The text was updated successfully, but these errors were encountered:
The Bug
Here is a reproduction CodeSandbox.
I am using openapi-zod-client to generate a zodios api, and am trying to use
isErrorFromPath
to narrow error types. However, I seem to get anever
type when attempting to use it (see screenshot).Workaround
You can work around this by adding an
alias
and usingisErrorFromAlias
instead. But this is quite a chore since we are generating the zodios api from an openapi yaml file. Regenerating the zodios api will also result in losing thesealias
fields.The text was updated successfully, but these errors were encountered: