manager-ui
manager-ui copied to clipboard
Update request utility to reject promise on 400 request error
Sentry issue was caused by not properly handling request that returned a 400 status code.
https://< zuid >.api.zesty.io/v1/content/models/< zuid >/items/< zuid >/versions
It is not clear why it 400ed and it was unreproducible on dev.
Rejecting promises on 400 request error ensures us that we can catch these errors properly and avoid executing subroutines that depend on data returned from a resolved request and without said data can cause unintended behavior.
PR will be updated