Created on 16 June 2024, about 1 year 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 GuzzleExceptions

πŸ“Œ Task
Status

Active

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.71.5 2024