Leosac  0.7.0
OpenSourceAccessControl
APIStatusCode.hpp
Go to the documentation of this file.
1 /*
2  Copyright (C) 2014-2016 Leosac
3 
4  This file is part of Leosac.
5 
6  Leosac is free software: you can redistribute it and/or modify
7  it under the terms of the GNU Affero General Public License as published by
8  the Free Software Foundation, either version 3 of the License, or
9  (at your option) any later version.
10 
11  Leosac is distributed in the hope that it will be useful,
12  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  GNU Affero General Public License for more details.
15 
16  You should have received a copy of the GNU Affero General Public License
17  along with this program. If not, see <http://www.gnu.org/licenses/>.
18 */
19 
20 #pragma once
21 
22 namespace Leosac
23 {
31 enum class APIStatusCode
32 {
36  SUCCESS = 0x00,
37 
41  GENERAL_FAILURE = 0x01,
42 
47  PERMISSION_DENIED = 0x02,
48 
53  RATE_LIMITED = 0x03,
54 
58  MALFORMED = 0x04,
59 
63  INVALID_CALL = 0x05,
64 
70  TIMEOUT = 0x06,
71 
77  SESSION_ABORTED = 0x07,
78 
82  ENTITY_NOT_FOUND = 0x08,
83 
87  DATABASE_ERROR = 0x09,
88 
93  UNKNOWN = 0x0A,
94 
100  MODEL_EXCEPTION = 0x0B,
101 
106  INVALID_ARGUMENT = 0x0C
107 };
108 }
The session has been aborted.
An internal database operation threw an exception.
The request took too long to process.
This is the header file for a generated source file, GitSHA1.cpp.
One of the argument of the call had a invalid value / type.
APIStatusCode
Those are the Leosac API status code.
The API method (ie, message&#39;s type) does not exist.
The requested entity cannot be found.
The source packet was malformed.
The websocket connection is not allowed to make the requested API call.
Some internal API rules has failed.
The websocket connection is rate limited, and it already sent too many packets.
Indicate that the request&#39;s processing went well.
A failure for an unknown reason.