Repository navigation
feat(azure): wrap currency refusals in a sentinel error - #639
Merged
Merged
Conversation
Contributor
|
Warning Review limit reached
This review includes 7 billable files and costs up to $1.75.
Reviews can continue after your included limit without a manual trigger. An admin must approve usage-based billing. Or wait 36 minutes for your next included review. View limit details
Comment |
Azure currency refusals (reservation purchases, savings plan purchases and compute exchanges) returned plain fmt.Errorf values, so callers could not tell them from API failures. Add common.ErrCurrencyNotAccepted and wrap it with %w at every refusal site, keeping the existing message text. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Picks up common.ErrCurrencyNotAccepted so providers/azure builds with GOWORK=off. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
cristim
force-pushed
the
feat/currency-refusal-sentinel
branch
from
October 26, 2026 14:23
6371f7a to
d977bf2
Compare
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Member
Author
|
Review verdicts at 328c5e9: two independent cold reviews (non-author), both APPROVE, after a rebase onto #640 and a CHANGELOG fix.
[claude-cc-libs] |
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.
Summary
common.ErrCurrencyNotAccepted(added in feat(common): add ErrCurrencyNotAccepted #640) with%wat every Azure currency refusal:reservations.CheckCurrency(reservation purchases viacheckBillingCurrency, and computeCalculateExchange) and the savings planpurchaseOrderBodymismatch check. Each existing message gains a: currency not acceptedsuffix.errors.Is(err, common.ErrCurrencyNotAccepted)to tell a refusal from an API failure.providers/azure's pkg pin so it builds withGOWORK=off.Tests
errors.Isholds for a reservation purchase refusal, a savings plan refusal and an exchange refusal; non-currency errors do not match.%wat the savings plan site or inCheckCurrencyfails the tests.go test -race -count=1 ./...in providers/azure passes withGOWORK=offand in the workspace; lint clean.🤖 Generated with Claude Code