-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
suggestion: Handle session expiration gracefully #526
Conversation
.catch((response: Response) => { | ||
if (response.status === 403) { | ||
setIsAlertsIntervalRunning(false); | ||
setShowModal(true); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems we'd only show this modal if, specifically, a background alerts request fails. How is the experience if some other kind of "foreground" request fails? Should we try to integrate this into all instances where we fetch data from the server?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because this task was already kind of scope creep-y, I focused specifically on what I knew to be the problem we see in Sentry.
You do raise a good point though. We've had a habit of assuming a request will be successful so we unintentionally fail silently in some areas. For example, I hardcoded a 500 for the Associate with alert
page and the only indicator that something went wrong is that the table is empty. Because this would be a bigger task, I'll get it added to the backlog for us to talk about in the future.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you end up writing this task? (sorry for letting this review drop off)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just wrote it up here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a good improvement to the UX as-is, so let's
Even after #520, we still need to handle errors when someone has Screenplay open during a deploy. I think this can best be handled by looking for
api
in the previous path and returning a 403 instead of a redirect. This allows us to throw/catch an exception on the client and display a modal letting the user know they need to refresh the page.