Skip to content

Proxy response status code if not successful

Patrick Bajao requested to merge pb-openai-proxy-status-code into master

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.

Edited by Patrick Bajao

Merge request reports