MPDX-9327 - Add error handling to duplicate request mutation in CurrentBoardApproved#1648
MPDX-9327 - Add error handling to duplicate request mutation in CurrentBoardApproved#1648zweatshirt wants to merge 6 commits intomainfrom
Conversation
Bundle sizes [mpdx-react]Compared against 9e37831 No significant changes found |
…ude test for error handling
|
@dr-bizz The test I've added here is arguably unneeded (since I can't fully replicate the backend behavior for this test). That being said, I think the refactors to the tests are helpful. |
| // Prevents unhandled promise rejection | ||
| onError: () => {}, |
There was a problem hiding this comment.
I would agrue that this is bad, we want an error to show when something like this happens. instead we should fix the core issue at hand, why do we allow the button to duplicate a MHA appear when they have one open
There was a problem hiding this comment.
Good point and I definitely agree, I can just hide the button altogether here. I'm not sure the reason we allow it to render, but if I had to guess it may have to do with the Figma design. I'll change that quickly.
There was a problem hiding this comment.
I wanted to be sure on this point: 'we want an error to show when something like this happens' you mentioned. An error does show if the onError callback is empty since client.ts provides a Snackbar for GraphQL errors. Working on ensuring the button is hidden now.
|
@dr-bizz Do you happen to know where |
Description
This prevents an unhandled runtime error and leads to better UI behavior for users.
Issue:
Solution:
client.tsError:
Future considerations: Possibly refactor to avoid the use of onCompleted and onError altogether.
Jira ticket
Testing
reports/housingAllowanceChecklist:
/pr-reviewcommand locally and fixed any relevant suggestions