Skip to content

Always show an unauthorized message when unauthorized #162

@blms

Description

@blms

There are currently circumstances that you get a 500 error instead, but we want to always show an unauthorized message.

If the user isn't signed in, we definitely need to display an unauthorized screen. We have this code for that:

{!session && !loading && (
  <UnauthorizedCard />
)}

In the case that a fetch fails in getInitialProps, we need to always pass along an error message to the page—and getInitialProps should immediately stop trying to do further fetching. Then, we want to display that error message, and make sure that if the main data we use is undefined, that code using it doesn't try to be run.

Metadata

Metadata

Assignees

No one assigned

    Labels

    UI/UXRelated to the user interfacebugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions