Skip to content

Improve default error handling #1409

@tpoliaw

Description

@tpoliaw

The default exception handler in the rest client currently only handles 404 and bundles everything else in together

    if code < 400:
        return None
    elif code == 404:
        return KeyError(str(response.json()))
    else:
        return BlueskyRemoteControlError(code, str(response))

It would be good to expand this to handle 401/403 as well as making 404 not a KeyError which only makes sense for certain requests.

Metadata

Metadata

Assignees

No one assigned

    Labels

    clientRelates to client code

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions