-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #115 from tochka-public/feature/jsonrpc-constants/…
…master feat: move pre-defined errors to constants
- Loading branch information
Showing
4 changed files
with
60 additions
and
17 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
namespace Tochka.JsonRpc.Common; | ||
|
||
/// <summary> | ||
/// Reserved predefined JSON-RPC error codes | ||
/// </summary> | ||
public static class JsonRpcErrorCodes | ||
{ | ||
/// <summary> | ||
/// Invalid JSON was received by the server. | ||
/// An error occurred on the server while parsing the JSON text. | ||
/// </summary> | ||
public const int ParseError = -32700; | ||
|
||
/// <summary> | ||
/// The JSON sent is not a valid Request object | ||
/// </summary> | ||
public const int InvalidRequest = -32600; | ||
|
||
/// <summary> | ||
/// The method does not exist or is not available | ||
/// </summary> | ||
public const int MethodNotFound = -32601; | ||
|
||
/// <summary> | ||
/// Invalid method parameters | ||
/// </summary> | ||
public const int InvalidParams = -32602; | ||
|
||
/// <summary> | ||
/// Internal JSON-RPC error | ||
/// </summary> | ||
public const int InternalError = -32603; | ||
} |
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