Created on 16 June 2024, 12 days ago
Updated 19 June 2024, 9 days ago

Problem/Motivation

Should the GuzzleException in invokeModelResponse be better as something more specific such as a BadResponseException which will have the response? You may everything else to AiRequestErrorException, but some of the guzzle exceptions are request level (i.e. pre-response).

Similarly, AiUnsafePromptException is only ever thrown in the catch that catches it. I'm assuming that' should be thrown up-stream, in which case I think the catch should log it and throw the existing exception rather than a new one (as that'll retain the stack trace etc).
On that note, we should probably include the previous exception for AiRequestErrorException and AiResponseErrorException.

Proposed resolution

* Retain the catches.
* Add AiBadResponseException for ClientExceptionInterface (Guzzler or GuzzleExceptions might not be available for all clients)

πŸ“Œ Task
Status

Fixed

Version

1.0

Component

Code

Created by

πŸ‡©πŸ‡ͺGermany Marcus_Johansson

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.69.0 2024