Skip to content

Inconsistent response return for login() #46

@UlrikHD

Description

@UlrikHD

Currently LemmyHttp.login() is the only function that checks for status code before returning a response object, raising a generic Exception if status code isn't 200. To keep functions consistent across all LemmyHttp functions, I would suggest either removing the status code check and just return the response object (preferably) or raising a more precise exception than the base Exception class.

The problem with the current implementation is that if we get an Exception during login, we can't check the response for more granular error handling, e.g. if login is denied or server is down.

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