Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .nx/version-plans/version-plan-1769795717757.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@storacha/capabilities': minor
---

Add new MissingCapacity failure type
7 changes: 6 additions & 1 deletion packages/capabilities/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1139,7 +1139,12 @@ export interface PlanNotFound extends Ucanto.Failure {
name: 'PlanNotFound'
}

export type PlanGetFailure = PlanNotFound | UnexpectedError
// Plan requires a capacity to be reserved but it has not been specified.
export interface MissingCapacity extends Ucanto.Failure {
name: 'MissingCapacity'
}

export type PlanGetFailure = PlanNotFound | MissingCapacity | UnexpectedError

export type PlanSet = InferInvokedCapability<typeof PlanCaps.set>

Expand Down