Skip to content
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

MMT-3923: Catch intermittent error from EDL #1329

Merged
merged 4 commits into from
Dec 12, 2024
Merged

MMT-3923: Catch intermittent error from EDL #1329

merged 4 commits into from
Dec 12, 2024

Conversation

htranho
Copy link
Contributor

@htranho htranho commented Dec 4, 2024

Overview

What is the feature?

cmr-graphql returns intermittent error getting acl and groups from EDL.

What is the Solution?

Catch that error and create banner message to refresh browser.

What areas of the application does this impact?

View of single Permission

Testing

See test session.

Attachments

N/A

Checklist

  • I have added automated tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings

@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 97.68%. Comparing base (53c2a92) to head (28339fc).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1329   +/-   ##
=======================================
  Coverage   97.68%   97.68%           
=======================================
  Files         366      366           
  Lines        5757     5757           
  Branches     1199     1211   +12     
=======================================
  Hits         5624     5624           
  Misses        132      132           
  Partials        1        1           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@mandyparson
Copy link
Contributor

Is there no way to reproduce this locally? For testing, all I see is 'see test session'

@htranho
Copy link
Contributor Author

htranho commented Dec 9, 2024

Is there no way to reproduce this locally? For testing, all I see is 'see test session'

It is about intermittent failing of EDL in production. Couldn't verify this issue on SIT or UAT and also in local mmt instance.

Copy link
Contributor

@mandyparson mandyparson left a comment

Choose a reason for hiding this comment

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

Unable to truly test this. But the code checks out.

@@ -17,9 +17,18 @@ class ErrorBoundary extends React.Component {
}

static getDerivedStateFromError(error) {
let errorMessage = error.message
Copy link
Collaborator

Choose a reason for hiding this comment

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

You should add a test that mocks this response

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added in ErrorBoundary.test.js

Copy link
Collaborator

@cgokey cgokey left a comment

Choose a reason for hiding this comment

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

I think a test is need that mocks a error response from EDL.

@htranho htranho merged commit 347c892 into main Dec 12, 2024
5 of 7 checks passed
@htranho htranho deleted the MMT-3923 branch December 12, 2024 20:03
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.

4 participants