Repository navigation
fix(model): map upstream provider errors - #1732
Merged
Merged
Conversation
Return structured errors for model provider failures so auth, quota, and service errors are not collapsed into generic 500 responses.
Contributor
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
Contributor
PR Code Suggestions ✨No code suggestions found for the PR. |
zhoujh01
approved these changes
Apr 27, 2026
A0nameless0man
pushed a commit
to A0nameless0man/OpenViking
that referenced
this pull request
Apr 30, 2026
Return structured errors for model provider failures so auth, quota, and service errors are not collapsed into generic 500 responses.
frankyang2008-eng
pushed a commit
to frankyang2008-eng/OpenViking
that referenced
this pull request
Oct 9, 2026
Return structured errors for model provider failures so auth, quota, and service errors are not collapsed into generic 500 responses.
11 of 21 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Map upstream model provider failures to structured OpenViking API errors instead of falling through to generic 500 responses. This also cleans up provider error messages so duplicated nested exception text is not shown to CLI users.
Related Issue
N/A
Type of Change
Changes Made
RESOURCE_EXHAUSTED,ABORTED, andUNIMPLEMENTED, while preserving unknown future error codes.Testing
Checklist
Screenshots (if applicable)
N/A
Additional Notes
Validated with:
.venv/bin/ruff check openviking/server/error_mapping.py openviking_cli/client/http.py openviking_cli/exceptions.py tests/server/test_error_mapping.py tests/client/test_http_error_mapping.py.venv/bin/ruff format --check openviking/server/error_mapping.py openviking_cli/client/http.py openviking_cli/exceptions.py tests/server/test_error_mapping.py tests/client/test_http_error_mapping.py.venv/bin/python -m pytest tests/server/test_error_mapping.py tests/client/test_http_error_mapping.pyThe pytest run still emits existing dependency/Pydantic deprecation warnings unrelated to this change.