summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/modules/rpc.h2
-rw-r--r--modules/rpc/rpc_main.cpp4
2 files changed, 4 insertions, 2 deletions
diff --git a/include/modules/rpc.h b/include/modules/rpc.h
index b33c26800..ca23a0286 100644
--- a/include/modules/rpc.h
+++ b/include/modules/rpc.h
@@ -26,6 +26,8 @@ namespace RPC
enum Error
: int64_t
{
+ ERR_CUSTOM_END = -32000,
+ ERR_CUSTOM_START = -32099,
ERR_PARSE_ERROR = -32700,
ERR_INVALID_REQUEST = -32600,
ERR_METHOD_NOT_FOUND = -32601,
diff --git a/modules/rpc/rpc_main.cpp b/modules/rpc/rpc_main.cpp
index 8b6a1797e..ad682817f 100644
--- a/modules/rpc/rpc_main.cpp
+++ b/modules/rpc/rpc_main.cpp
@@ -50,7 +50,7 @@ public:
request.reply = this->repl;
- request.Error(-32000, "Invalid password");
+ request.Error(RPC::ERR_CUSTOM_START, "Invalid password");
xinterface->Reply(request);
client->SendReply(&request.reply);
@@ -81,7 +81,7 @@ public:
BotInfo *bi = BotInfo::Find(service, true);
if (!bi)
{
- request.Error(-32000, "Invalid service");
+ request.Error(RPC::ERR_CUSTOM_START, "Invalid service");
return true;
}