zesty-io / accounts-ui

Zesty.io account management application
https://accounts.zesty.io
112 stars 14 forks source link

Domain request error handling #109

Closed grantglidewell closed 5 years ago

grantglidewell commented 5 years ago

previous behavior

errors were not handled, success was reported to the user despite a 400 response. Relying on a catch() in the request promise does not result in what we wanted.

proposed behavior

similar changes to the request handler that were made in manager, to handle status codes before returning JSON to the request originator. Request originators or requests in actions can now handle failure scenarios and display appropriate messages. Domain change requests now report a problem when trying to change it to an empty string.