8000 Lack of documentation on breaking changes from 0.x to 1.x — what changed with error handling? · Issue #7208 · axios/axios · GitHub
[go: up one dir, main page]

Skip to content

Lack of documentation on breaking changes from 0.x to 1.x — what changed with error handling? #7208

@igorsantos07

Description

@igorsantos07

Section/Content To Improve

More specifically, I see error handling changed and there's no clear path forward.

As mentioned in a post from 2023, Axios now throws up for many error codes where it didn't before.

In my specific case, errors were handled centralized in a response interceptor, and now it looks like I'll have to add empty and meaningless .catch() calls in every. API. call. Is there any other way to signal an error as handled, so it doesn't get thrown? Should I open an issue to request that, or it doesn't make any sense?

Besides that, there's a MIGRATION_GUIDE.md in the repo......... empty 😬
Lastly, the changelog doesn't help to explain what changed on the big picture, just each code change that happened. Nothing there pointed me to this change in error handling, so I got a bit puzzled... until I tried to work around it and realized it wasn't really achievable without deeper changes.

Suggested Improvement

  1. Even though there are years since 1.x got launched, there should still be docs at least with breaking changes between releases
  2. MIGRATION_GUIDE.md should be filled, as it's even mentioned at https://axios-http.com/docs/notes
  3. Add the Migration Guide to the sidebar; it should be a first-class citizen in the docs, not relegated to an odd place like a link under "Other > Notes > Resources"

Bonus question: is there anything that can be done to still centralize error handling in interceptors?

Relevant File(s)

MIGRATION_GUIDE.md

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0