Repository navigation
fix(domain): fail quote when it can't be saved for purchase - #324
Merged
Merged
Conversation
`gddy domain quote` now stops with an error when it can't save the quote on this machine, instead of printing the quote and suggesting a purchase step that would fail with "no cached quote for that token". The error names the file it tried to write and the reason, and tells you how to fix it: make the folder writable or free up disk space, then re-run the quote (quotes are free). On Linux and Windows it also says how to save somewhere else (`XDG_CONFIG_HOME` or `APPDATA`) and to use the same setting when running `domain purchase`. `domain purchase` no longer tells macOS and Windows users to set `XDG_CONFIG_HOME` when it can't find the folder where quotes are saved. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
jpage-godaddy
requested review from
axburgess-godaddy,
jpearlman-godaddy,
mguerrero3-godaddy,
qcai-godaddy and
rts1-godaddy
as code owners
October 13, 2026 22:43
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Windows recovery guidance is ineffective, and purchase still omits structured configuration-error metadata.
3 open findings
What changed in this PR
Makes domain quoting fail when its purchase cache cannot be saved.
Changes:
- Converts quote-cache write failures into actionable
CONFIG_ERRORresponses. - Adds platform-specific recovery guidance.
- Adds failure-path unit tests.
| File | Description |
|---|---|
rust/src/domain/quote.rs |
Propagates quote-cache save failures. |
rust/src/domain/quote_cache.rs |
Builds recovery errors and adds tests. |
rust/src/domain/purchase.rs |
Updates missing-cache-directory guidance. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Only Linux can move the folder where quotes are saved (via `XDG_CONFIG_HOME`); macOS and Windows derive it from the account, so the error no longer suggests setting `APPDATA`. The fix now leads with resolving the reported problem, keeping "make the folder writable or free up disk space" as examples, since the cause can be anything the file system reports. `domain purchase` also returns its missing-folder failure with a stable error code and a suggested fix, matching `domain quote`. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
rts1-godaddy
approved these changes
Oct 14, 2026
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
gddy domain quotenow stops with an error when it can't save the quote on this machine. Previously it printed the quote and suggesteddomain purchase --quote-token ..., which then failed with "no cached quote for that token" — the only hint was a log line that is hidden in normal use.domain purchasecan only rebuild a quote from the copy saved bydomain quote, so a quote that isn't saved can't be bought from that machine.Behavior
CONFIG_ERRORthat names the file and the reason, for example "could not save the quote for example.com to /home/me/.config/gddy/quotes.json: ...".gddy domain quote <domain>. Quotes are free, so retrying costs nothing.XDG_CONFIG_HOME) and reminds you to use the same setting when runningdomain purchase. macOS and Windows get no relocation hint because the folder can't be redirected there.domain purchasegives the same platform-specific advice, with a stable error code and suggested fix, when it can't find the folder.Testing
cargo check,clippy -D warnings,cargo test --workspace,cargo fmt --checkand the module-size check pass.🤖 Generated with Claude Code