Skip to content

Auto handling of specific error types #202

@oudeismetis

Description

@oudeismetis

It would be great if you could set up a Collection Manager or an API and configure it with a callback for any and all calls that result in...say...a 401 error.

The main use case being when a user's token expires or gets deleted. There are certain critical API endpoints that should never fail for the user. If they do, then it likely means the users token is bad. In the callback I could then maybe call an endpoint to verify that their token is in fact bad and then, based on the result of that call, either redirect them to their dashboard or to the login page.

In my app currently, a 401 results in a broken page with nothing making it obvious that the user needs to log out and log back in. To fix that I'll have to go through all of my business logic, find every call to every critical API service and handle each one of those individually. Will then need to remember to do that for any new calls that are added to the business logic in the future.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions