Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
feat: error management (#802)
* Error types

* Update DIP provider runtime APIs types

* Update packages version
  • Loading branch information
ntn-x2 committed Dec 13, 2023
commit 0735b8ccb345438e009ae2819aa5acafb1f28750
2 changes: 1 addition & 1 deletion packages/type-definitions/src/runtime/dipProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export const calls: DefinitionsCall = {
type: 'DipProofRequest',
},
],
type: 'Result<CompleteMerkleProof, ()>',
type: 'Result<CompleteMerkleProof, RuntimeApiDipProofError>',
},
},
version: 1,
Expand Down
26 changes: 26 additions & 0 deletions packages/type-definitions/src/types_11000.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,4 +58,30 @@ export const types11000: RegistryTypes = {
Web3NameMerkleValue: 'BlockNumber',
LinkedAccountMerkleKey: 'PalletDidLookupLinkableAccountLinkableAccountId',
LinkedAccountMerkleValue: 'Null',
RuntimeApiDipProofError: {
_enum: {
IdentityNotFound: null,
IdentityProviderError: 'CombineError',
MerkleProofError: 'DidMerkleProofError',
},
},
CombineError: {
_enum: {
A: 'DidIdentityProviderError',
B: 'DidIdentityProviderError',
C: 'DidIdentityProviderError',
},
},
DidIdentityProviderError: {
_enum: ['DidNotFound', 'Internal'],
},
DidMerkleProofError: {
_enum: [
'DidNotFound',
'KeyNotFound',
'LinkedAccountNotFound',
'Web3NameNotFound',
'Internal',
],
},
}