Handle errors from updating billing contacts
Design
Problem
We need to handle potential backend and graphQL failures that arise when updating billing contacts.
Proposal
- Add entries to the error_dictionary.js for:
-
BillingAccountContact validations
- Example implementation MR: https://gitlab.com/gitlab-org/customers-gitlab-com/-/merge_requests/8477
- Zuora contact ID not found
-
SyncBillingAccountContactToZuoraService
- Update existing
errors.add
call to useerrorType
with message- Currently using a
String
for theerrorType
. Add in a trueerrorType
and also retain the existing message
- Currently using a
- Update existing
-
UpdateBillingAccountContactsService
call fromUpdateContacts
mutation- Update
ZuoraAccountUpdateError
/ZuoraContactCreateError
to automatically add anerror
map entry- Set up similar to GraphQL where we always
errors.add()
when the errors are raised- Either
rescue
errors and rethrow after adding to error map, OR find all spots where we're raising anderrors.add()
before raising (less ideal)
- Either
- Set up similar to GraphQL where we always
- Update
-
BillingAccountContact validations
|
Backend error message: |
|
Backend error message: |
Other Billing account update failure (non- |