Skip to content

Don't throw for logged out users #104

@vasklund

Description

@vasklund

This is a suggestion to not throw an error when calling Identity.hasSession() in a browser without an active session (user is logged out). For example this makes it harder to distinguish real errors in the Identity.on('error', callback) function.

Compare with for example the browser fetch API: https://developer.mozilla.org/en-US/docs/Web/API/Response, where only network errors are thrown as "real errors", and everything else is successful but together with a statusCode.

Suggestion from SvD 😃

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