Skip to content

Commit

Permalink
feat: error management (#802)
Browse files Browse the repository at this point in the history
* Error types

* Update DIP provider runtime APIs types

* Update packages version
  • Loading branch information
ntn-x2 committed Nov 9, 2023
1 parent b5f5651 commit 38d0c30
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 1 deletion.
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',
],
},
}

0 comments on commit 38d0c30

Please sign in to comment.