fix(ai): return user-friendly errors across AI features - #1035
Merged
WCY-dt merged 1 commit intoAug 27, 2026
Merged
Conversation
marcomarcogd
marked this pull request as ready for review
August 26, 2026 00:54
Member
|
麻烦解决一下冲突 |
marcomarcogd
force-pushed
the
codex/fix-ai-friendly-errors
branch
from
August 27, 2026 01:39
8e8b234 to
12a00f1
Compare
Contributor
Author
|
冲突已解决,已基于最新 |
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
Classifies AI provider and transport failures into stable, user-facing error codes and short localized messages. Long provider JSON, authentication details, and complete responses are no longer returned to AI search, configuration tests, Profile tests, summaries, or translation UI paths.
Type of Change
Related Issues
Fixes #1034
Changes Made
/api/ai/searchHTTP 200 plussuccess=falsecompatibility while addingerror_code.Screenshots
Not included because the before-state can expose provider response data. The frontend regression is covered by the existing test suite in the downstream integration.
Testing
Test Configuration
main@fd351377/ 1.3.27Test Steps
go test -v -timeout=5m ./internal/ai ./internal/handlers/ai ./internal/handlers/summary ./internal/handlers/translationcd frontend && npm run lintChecklist
Additional Notes
This PR intentionally excludes Toast layout, article-chat persistence, fork branding, release metadata, and changelog changes. Those concerns are handled separately.
Breaking Changes
None. Existing response fields and the AI Search HTTP 200 error convention remain available.