Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
A
aisbf
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexlab
aisbf
Commits
92ae0497
Commit
92ae0497
authored
Feb 08, 2026
by
Stefy Lanza (nextime / spora )
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix duplicate error message by skipping first line of error_details
parent
378e4127
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
handlers.py
aisbf/handlers.py
+4
-4
No files found.
aisbf/handlers.py
View file @
92ae0497
...
...
@@ -932,7 +932,7 @@ class RotationHandler:
if
notify_errors
:
logger
.
info
(
f
"notifyerrors is enabled for rotation '{rotation_id}', returning error as normal message"
)
# Return a normal response with error message instead of HTTP 503
error_message
=
f
"All providers in rotation '{rotation_id}' failed. Details:
\n
{chr(10).join(error_details)}"
error_message
=
f
"All providers in rotation '{rotation_id}' failed. Details:
\n
{chr(10).join(error_details
[1:]
)}"
error_response
=
{
"id"
:
f
"error-{rotation_id}-{int(time.time())}"
,
"object"
:
"chat.completion"
,
...
...
@@ -963,7 +963,7 @@ class RotationHandler:
else
:
logger
.
info
(
f
"notifyerrors is disabled for rotation '{rotation_id}', returning error with status code 429"
)
# Return a normal response with error message and status code 429
error_message
=
f
"All providers in rotation '{rotation_id}' failed. Details:
\n
{chr(10).join(error_details)}"
error_message
=
f
"All providers in rotation '{rotation_id}' failed. Details:
\n
{chr(10).join(error_details
[1:]
)}"
error_response
=
{
"id"
:
f
"error-{rotation_id}-{int(time.time())}"
,
"object"
:
"chat.completion"
,
...
...
@@ -1340,7 +1340,7 @@ class RotationHandler:
if
notify_errors
:
logger
.
info
(
f
"notifyerrors is enabled for rotation '{rotation_id}', returning error as normal message"
)
# Return a normal response with error message instead of HTTP 503
error_message
=
f
"All providers in rotation '{rotation_id}' failed after {max_retries} attempts. Details:
\n
{chr(10).join(error_details)}"
error_message
=
f
"All providers in rotation '{rotation_id}' failed after {max_retries} attempts. Details:
\n
{chr(10).join(error_details
[1:]
)}"
error_response
=
{
"id"
:
f
"error-{rotation_id}-{int(time.time())}"
,
"object"
:
"chat.completion"
,
...
...
@@ -1375,7 +1375,7 @@ class RotationHandler:
else
:
logger
.
info
(
f
"notifyerrors is disabled for rotation '{rotation_id}', returning error with status code 429"
)
# Return a normal response with error message and status code 429
error_message
=
f
"All providers in rotation '{rotation_id}' failed after {max_retries} attempts. Details:
\n
{chr(10).join(error_details)}"
error_message
=
f
"All providers in rotation '{rotation_id}' failed after {max_retries} attempts. Details:
\n
{chr(10).join(error_details
[1:]
)}"
error_response
=
{
"id"
:
f
"error-{rotation_id}-{int(time.time())}"
,
"object"
:
"chat.completion"
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment