Skip to content

Commit

Permalink
fix: don't error when we can't figure out a name for a space (storach…
Browse files Browse the repository at this point in the history
…a#1177)

@juliangruber reported an issue with our documented space creation flow
when the exported space access delegation doesn't specify a name and the
client doesn't specify one manually:

storacha#1175

I think it's reasonable to require a name for spaces at some level, but
I think the access-client API is too low-level for this.
  • Loading branch information
travis authored Nov 22, 2023
1 parent 418c0a4 commit a31f667
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions packages/access-client/src/agent.js
Original file line number Diff line number Diff line change
Expand Up @@ -346,12 +346,6 @@ export class Agent {
? Space.fromDelegation(delegation)
: Space.fromDelegation(delegation).withName(name)

if (space.name === '') {
throw new Error(
'Space has no name, please pass a `name` option to specify it'
)
}

this.#data.spaces.set(space.did(), { ...space.meta, name: space.name })

await this.addProof(space.delegation)
Expand Down

0 comments on commit a31f667

Please sign in to comment.