You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
w3 space usage shows uncaught error Error: no proofs available for resource did:key:z6MkkzxLtWpqXQPPXLEjD2M2gWJZikcpCbdk4HBf7tj7K59j and ability usage/report#168
Open
gobengo opened this issue
Jan 24, 2024
· 1 comment
file:///Users/bengo/.nvm/versions/node/v20.11.0/lib/node_modules/@web3-storage/w3cli/node_modules/@web3-storage/access/dist/src/agent.js:489
throw new Error(no proofs available for resource ${space} and ability ${cap.can});
^
Error: no proofs available for resource did:key:z6MkkzxLtWpqXQPPXLEjD2M2gWJZikcpCbdk4HBf7tj7K59j and ability usage/report
at Agent.invoke (file:///Users/bengo/.nvm/versions/node/v20.11.0/lib/node_modules/@web3-storage/w3cli/node_modules/@web3-storage/access/dist/src/agent.js:489:19)
at Agent.invokeAndExecute (file:///Users/bengo/.nvm/versions/node/v20.11.0/lib/node_modules/@web3-storage/w3cli/node_modules/@web3-storage/access/dist/src/agent.js:424:32)
at report (file:///Users/bengo/.nvm/versions/node/v20.11.0/lib/node_modules/@web3-storage/w3cli/node_modules/@web3-storage/w3up-client/src/capability/usage.js:38:31)
at UsageClient.report (file:///Users/bengo/.nvm/versions/node/v20.11.0/lib/node_modules/@web3-storage/w3cli/node_modules/@web3-storage/w3up-client/src/capability/usage.js:16:23)
at getSpaceUsageReports (file:///Users/bengo/.nvm/versions/node/v20.11.0/lib/node_modules/@web3-storage/w3cli/index.js:631:54)
at getSpaceUsageReports.next ()
at usageReport (file:///Users/bengo/.nvm/versions/node/v20.11.0/lib/node_modules/@web3-storage/w3cli/index.js:591:53)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
Node.js v20.11.0
Context
in my account there are proofs for many spaces, including old ones from before we had usage/report
some of those proofs cause spaces to be checked for usage, but because we don't have authorizations for usage/report for those space, the server rejects the usage/report invocation
the w3cli is not expecting this error, so it goes uncaught and fails
What should it do?
At the very least, catch this error and give a better explanation to the user about what happened
maybe also continue on getting usage/report for other spaces that dont error, and only show the errors at the end with a partial usage report
The text was updated successfully, but these errors were encountered:
Context
usage/report
usage/report
for those space, the server rejects theusage/report
invocationWhat should it do?
usage/report
for other spaces that dont error, and only show the errors at the end with a partial usage reportThe text was updated successfully, but these errors were encountered: