-
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.
feat: move pre-defined errors to constants
- Loading branch information
ekonyukov
committed
Aug 26, 2024
1 parent
2c0dc73
commit 919cca2
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 pre-defined JSON-RPC error codes | ||
/// </summary> | ||
public static class JsonRpcPreDefinedErrorCodes | ||
{ | ||
/// <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