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

Improve submission error handling #1961

Merged
merged 2 commits into from Apr 8, 2019

Conversation

3 participants
@jim
Copy link
Contributor

jim commented Apr 3, 2019

Description

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.

Reviewer Notes

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 swaggerRequest and I didn't want to make a big wave with this fix.

Setup

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 pickup_address_id before submitting the signed certification form.

Code Review Verification Steps

  • Code follows the guidelines for Logging
  • The requirements listed in
    Querying the Database Safely
    have been satisfied.
  • Request review from a member of a different team.
  • Have the Pivotal acceptance criteria been met for this change?

References

Screenshots

(Note: the error message no longer mentions reloading the page.)

Screen Shot 2019-04-03 at 3 17 32 PM

@chrisgilmerproj
Copy link
Contributor

chrisgilmerproj left a comment

🚀 - this looks good but I'd love it if someone else could also approve.

@codecov

This comment has been minimized.

Copy link

codecov bot commented Apr 8, 2019

Codecov Report

Merging #1961 into master will decrease coverage by 0.19%.
The diff coverage is 100%.

@@            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
@kahlouie
Copy link
Contributor

kahlouie left a comment

:shipit:

@jim jim merged commit 9548fd8 into master Apr 8, 2019

19 checks passed

Codacy/PR Quality Review Up to standards. A positive pull request.
Details
ci/circleci: acceptance_tests_experimental Your tests passed on CircleCI!
Details
ci/circleci: acceptance_tests_local Your tests passed on CircleCI!
Details
ci/circleci: acceptance_tests_staging Your tests passed on CircleCI!
Details
ci/circleci: build_app Your tests passed on CircleCI!
Details
ci/circleci: build_migrations Your tests passed on CircleCI!
Details
ci/circleci: build_tools Your tests passed on CircleCI!
Details
ci/circleci: client_test Your tests passed on CircleCI!
Details
ci/circleci: integration_tests_api Your tests passed on CircleCI!
Details
ci/circleci: integration_tests_mymove Your tests passed on CircleCI!
Details
ci/circleci: integration_tests_office Your tests passed on CircleCI!
Details
ci/circleci: integration_tests_tsp Your tests passed on CircleCI!
Details
ci/circleci: pre_deps_golang Your tests passed on CircleCI!
Details
ci/circleci: pre_deps_yarn Your tests passed on CircleCI!
Details
ci/circleci: pre_test Your tests passed on CircleCI!
Details
ci/circleci: server_test Your tests passed on CircleCI!
Details
ci/circleci: server_test_coverage Your tests passed on CircleCI!
Details
codecov/patch 100% of diff hit (target 60.83%)
Details
codecov/project/go Absolute coverage decreased by -0.2% but relative coverage increased by +39.33% compared to c581f65
Details

@jim jim deleted the jb-improve-submission-error-handling branch Apr 8, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.