Repository navigation
fix(images): preserve insufficient balance failures - #7442
Merged
Wei-Shaw merged 1 commit intoSep 22, 2026
Merged
Conversation
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
问题
被包装为 5xx 的
insufficient_balance错误会触发瞬态故障转移,并在所有候选渠道耗尽后返回通用的耗尽错误,导致调用方无法稳定识别余额不足。根因
外层 HTTP 状态分类先于语义化结构错误识别执行,使结构化的余额不足错误被归入瞬态服务端错误。
改动
error.code=insufficient_balance。验证
已验证:
go test -tags=unit ./...go test -tags=integration ./...golangci-lint run --timeout=30m ./...(0 issues)go build -trimpath ./cmd/servergovulncheck ./...(0 called vulnerabilities)首次并发执行前端构建时遇到可恢复的
ENOTEMPTY输出目录竞争;隔离后重新运行已通过。Fixes #7436