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

Adding TS generic to AxiosError to allow specifying the response format #1874

Closed
wants to merge 1 commit into from

Conversation

iamakulov
Copy link

This adds a generic to the AxiosError type and allows usage like this:

const getServerErrorMessage = (axiosError: AxiosError<{ errors: string[] }>) =>
  axiosError.response.data.errors[0];

@emilyemorehouse
Copy link
Member

Fixed in #1738

@axios axios locked and limited conversation to collaborators May 3, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants