-
Couldn't load subscription status.
- Fork 768
fix: handle provider error logs addition #1241
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -62,13 +62,6 @@ export class ResponseService { | |
|
|
||
| this.updateHeaders(finalMappedResponse, cache.cacheStatus, retryAttempt); | ||
|
|
||
| if (!finalMappedResponse.ok) { | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Instead of throwing error, tryPost will return it just as a simple response as throwing error is redundant. In tryTargetsRecursively, we are already checking for response.ok |
||
| const errorObj: any = new Error(await finalMappedResponse.clone().text()); | ||
| errorObj.status = finalMappedResponse.status; | ||
| errorObj.response = finalMappedResponse; | ||
| throw errorObj; | ||
| } | ||
|
|
||
| return { | ||
| response: finalMappedResponse, | ||
| responseJson, | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since this PR removes the throw new Error() logic in tryPost for LLM failures, we no longer need to set it here. If the any error is caught, they will always be an Gateway exception.