Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
Improve submission error handling #1961
This PR adds some better error handling to the move submission for HHGs so that if a move fails to save, the user is presented with an error.
There is also a new model-level validation to prevent moves from being submitted if they don't have a pickup address.
It appears that we aren't rejecting promises in a lot of our older code, which makes handling errors at the call site more difficult. I think this is better with the newer style, but since this is part of the SM UI, little of the code there uses
This should be difficult to actually trigger (is basically shouldn't happen when things are working correctly), but one way to cause it to happen is to clear out a moves
Code Review Verification Steps
(Note: the error message no longer mentions reloading the page.)
@@ Coverage Diff @@ ## master #1961 +/- ## ========================================== - Coverage 60.83% 60.64% -0.19% ========================================== Files 192 193 +1 Lines 12225 12295 +70 ========================================== + Hits 7437 7456 +19 - Misses 3909 3960 +51 Partials 879 879