manager-ui icon indicating copy to clipboard operation
manager-ui copied to clipboard

Update request utility to reject promise on 400 request error

Open agalin920 opened this issue 2 years ago • 1 comments

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.

agalin920 avatar Aug 03 '22 01:08 agalin920

PR will be updated

agalin920 avatar Sep 14 '22 22:09 agalin920