Include `axios.isAxiosError` in axios-http.com docs
Section/Content To Improve
https://axios-http.com/docs/notes (See "Typescript")
Suggested Improvement
axios.isAxiosError helper is useful in a Typescript environment when handling axios errors. This is documented here: https://github.com/axios/axios#typescript but not mentioned on axios-http.com.
Suggestion: Include the following in axios-http.com docs
let user: User = null;
try {
const { data } = await axios.get('/user?ID=12345');
user = data.userDetails;
} catch (error) {
if (axios.isAxiosError(error)) {
handleAxiosError(error);
} else {
handleUnexpectedError(error);
}
}
Relevant File(s)
Not sure which files are used for axios-http.com.
I'll be happy to make a PR for this change if agreeable.
I think the documentation is generated from below repository https://github.com/axios/axios-docs
Looks like the docs is already updated.
i cant found the axios.isAxiosError in this doc: https://axios-http.com/ where can i found?
@artze
@RobertDS07
Seems to have disappeared. You can use this as reference though: https://github.com/axios/axios/pull/3767/files