Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: pass isSuccess to axios call #2031

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

rossmacarthur
Copy link

No description provided.

@mrlubos
Copy link
Collaborator

mrlubos commented Feb 11, 2024

@rossmacarthur which issue does this fix?

@rossmacarthur
Copy link
Author

rossmacarthur commented Feb 12, 2024

@mrlubos Without this you can't really change the behaviour of isSuccess because what axios considers an error response diverges from the request.ts code. This is particularly annoying when using axios interceptors. It makes much more sense to use the same function for determining success and the axios signature is the same.

@mrlubos
Copy link
Collaborator

mrlubos commented Feb 12, 2024

@rossmacarthur any chance you can share an example or add a test this fixes? I'd be happy to merge this into our fork

@jordanshatford
Copy link

To anyone still looking for this, check out our (previously forked) version of this package https://github.com/hey-api/openapi-ts. We have just recently added support for setting request/response interceptors. In the case of axios, this would allow you to modify the config used for each request before the request is sent. Please check it out if you'd like, and create any issues if you run into problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants