Skip to content

Conversation

@chay-REIsys
Copy link
Collaborator

Summary

Fixes / Work for #7336

Changes proposed

get Application Details is included in try catch to handle exceptions much better
added unit tests for the method

Context for reviewers

  • login with user A
  • create application
  • access any form from forms table
  • logout
  • login with other user it will redirect to the previous link when we logged out but now we show error page as below
image

Copy link
Collaborator

@doug-s-nava doug-s-nava left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

love the new tests - please keep any of these that are relevant even if the PR doesn't end up making any changes to the fetchers

@@ -0,0 +1,185 @@
import {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❤️

tags: [`application-${applicationId}`, "application-details"],
},
});
try {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The most correct fix for this issue, I'm realizing, is to wrap this page in an AuthorizationGate component. This would mean a pretty sizeable refactor of the existing page, and the application page needs that work done as well. I can make a separate ticket for you to pick up as a follow up to implement that.

For now, can you follow the pattern that exists on the application page, and add the try catch logic within the page component, where the call to the fetch function is being made, and return the <TopLevelError> if an error occurs?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants