-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1eb2876
commit e00264c
Showing
6 changed files
with
199 additions
and
42 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
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,51 @@ | ||
// https://eips.ethereum.org/EIPS/eip-1474 | ||
export const errorCodes = { | ||
PARSE_ERROR: { | ||
code: -32700, | ||
name: 'Parse error', | ||
}, // Invalid JSON | ||
INVALID_REQUEST: { | ||
code: -32600, | ||
name: 'Invalid Request', | ||
}, // JSON is not a valid request object | ||
METHOD_NOT_FOUND: { | ||
code: -32601, | ||
name: 'Method not found', | ||
}, // Method does not exist | ||
INVALID_PARAMS: { | ||
code: -32602, | ||
name: 'Invalid params', | ||
}, // Invalid method parameters | ||
INTERNAL_ERROR: { | ||
code: -32603, | ||
name: 'Internal error', | ||
}, // Internal JSON-RPC error | ||
INVALID_INPUT: { | ||
code: -32000, | ||
name: 'Invalid input', | ||
}, // Missing or invalid parameters | ||
RESOURCE_NOT_FOUND: { | ||
code: -32001, | ||
name: 'Resource not found', | ||
}, // Requested resource not found | ||
RESOURCE_UNAVAILABLE: { | ||
code: -32002, | ||
name: 'Resource unavailable', | ||
}, // Requested resource not available | ||
TRANSACTION_REJECTED: { | ||
code: -32003, | ||
name: 'Transaction rejected', | ||
}, // Transaction creation failed | ||
METHOD_NOT_SUPPORTED: { | ||
code: -32004, | ||
name: 'Method not supported', | ||
}, // Method is not implemented | ||
LIMIT_EXCEEDED: { | ||
code: -32005, | ||
name: 'Limit exceeded', | ||
}, // Request exceeds defined limit | ||
JSON_RPC_VERSION_NOT_SUPPORTED: { | ||
code: -32006, | ||
name: 'JSON-RPC version not supported', | ||
}, // Version of JSON-RPC protocol is not supported | ||
}; |
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