Proxy response status code if not successful
What does this MR do and why?
Currently all requests are returning as 201 even if they're not really successful. Reported in !116875 (comment 1349372069).
To fix that, we check if response from API is successful. If not, proxy the status back to user. Also re-raise the error we rescue after logging so it'll return a 500 status.
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Edited by Patrick Bajao