-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: access-api handling store/info for space not in db returns fail…
…ure with name (#391) Motivation: * implement #382 * tl;dr `space/info` now has explicit failure type for case where the ucans are valid, but the space DID is not in the db. that way when upload-api invokes `space/info` as part of its `verifyInvocation` logic, it can distinguish between an invalid invocation and a not-found space id Unblocks: * this test passing gobengo/w3protocol-test#1 * rest of storacha/w3infra#134 (comment)
- Loading branch information
Showing
4 changed files
with
32 additions
and
2 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import * as Ucanto from '@ucanto/interface' | ||
|
||
/** | ||
* Indicates failure executing ability that requires access to a space that is not well-known enough to be handled. | ||
* e.g. it's a space that's never been seen before, | ||
* or it's a seen space that hasn't been fully registered such that the service can serve info about the space. | ||
*/ | ||
export interface SpaceUnknown extends Ucanto.Failure { | ||
error: true | ||
message: string | ||
name: 'SpaceUnknown' | ||
} |
This file contains 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