mirror of
https://github.com/open-webui/open-webui.git
synced 2026-03-09 07:18:29 -05:00
In both inlet and outlet filter processing, response.json() was called BEFORE response.raise_for_status(). When a filter endpoint returns an HTTP error, the user's chat payload gets silently overwritten with the error response body. If the error is not caught, the corrupted payload propagates through subsequent filters and into the chat completion. Swapped the order so raise_for_status() runs first — payload is only updated on success. Co-authored-by: gambletan <ethanchang32@gmail.com>