Skip to content

fix: re-use InsufficientStorage error instead of creating new error - #68

Merged
alanshaw merged 2 commits into
mainfrom
ash/fix/reuse-insufficientstorage-error
Sep 9, 2026
Merged

fix: re-use InsufficientStorage error instead of creating new error#68
alanshaw merged 2 commits into
mainfrom
ash/fix/reuse-insufficientstorage-error

Conversation

@alanshaw

@alanshaw alanshaw commented Sep 9, 2026

Copy link
Copy Markdown
Member

No description provided.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

It removes an exported constant in a public package (API break) and the updated docs can be clarified to more precisely describe the failure behavior.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

This PR updates the /routing/use command’s documented/stable receipt-failure naming to align “space not provisioned” failures with the shared InsufficientStorage error name (from the access package) rather than a routing-specific error name.

Changes:

  • Updates /routing/use documentation to reference InsufficientStorage for unprovisioned spaces.
  • Removes the routing-specific SpaceNotProvisionedErrorName constant in favor of the shared error naming.
File summaries
File Description
commands/routing/use.go Updates docs and exported error-name constants to align unprovisioned-space failures with InsufficientStorage.
Review details

Suppressed comments (1)

commands/routing/use.go:30

  • Removing the exported SpaceNotProvisionedErrorName constant is a public API break for downstream users that import commands/routing. Consider keeping it as a deprecated alias that now resolves to the shared InsufficientStorage receipt-failure name, so existing code continues to compile while the protocol error name is unified.
// UnknownPolicyErrorName is the stable receipt-failure name when the
// referenced policy has no stored candidate set. A space with no service
// provider fails with the shared InsufficientStorage name from the access
// package, as every other capability on an unprovisioned space does.
const UnknownPolicyErrorName = "UnknownPolicy"
  • Files reviewed: 1/1 changed files
  • Comments generated: 1
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread commands/routing/use.go Outdated
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The change is a documentation/constant cleanup with no remaining references to the removed error name found in the codebase.

Review details
  • Files reviewed: 1/1 changed files
  • Comments generated: 0 new
  • Review effort level: Lite

@alanshaw
alanshaw merged commit 181acf2 into main Sep 9, 2026
9 checks passed
@alanshaw
alanshaw deleted the ash/fix/reuse-insufficientstorage-error branch September 9, 2026 13:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants