zeroant-constant
Version:
constant modules for zeroant
58 lines (57 loc) • 2.88 kB
TypeScript
export declare enum StatusCode {
SUCCESS = 200,
CREATED = 201,
BAD_REQUEST = 400,
UNAUTHENTICATED = 401,
FORBIDDEN = 403,
NOT_FOUND = 404,
UNPROCESSABLE_ENTITY = 422,
INTERNAL_SERVER_ERROR = 500,
BAD_GATEWAY = 502
}
export declare enum ErrorDescription {
INVALID_INPUT = "Input provided is not valid.",
INVALID_PAYLOAD = "Payload provided does not satisfy our request body requirements.",
MAINTENANCE = "Server module under maintenance",
FORBIDDEN = "User does not have the permission to access or create resource",
QUERY_EXCEPTION = "Malformed query founds in database operations.",
UNEXPECTED_ERROR = "An unexpected events occurs on database transactions or server operations. ",
UNHANDLED_EXCEPTION = "Errors generate from operations without exception handling.",
CLIENT_EXCEPTION = "Client made an invalid request.",
SERVER_EXCEPTION = "Server failed to fulfill a request. ",
UNAUTHORIZED = "You have no permission access to the resources",
UNAUTHENTICATED = "Unable to authenticated with the provided credentials",
API_KEY_INVALID = "API Key invalid",
NOT_FOUND = "Record not found",
BAD_GATEWAY = "Unknown error occurs",
INVALID_TOKEN_FORMAT = "The token provided in your request is not in the expected format.",
IMPLEMENTATION_EXCEPTION = "It appears that there is an issue with the implementation of a specific feature in the software",
UNIMPLEMENTED_EXCEPTION = "It appears that the feature you're attempting to access is not yet implemented in the software",
CONFIG_EXCEPTION = "It seems that there is an issue with the configuration settings of the software",
INVALID_ARGUMENT = "It seems that there is an issue with the argument of the function call",
CACHE_EXCEPTION = "It seems that there is an issue with the cache implementation of the function call",
INVALID_CREDENTIAL = "The credential provided in your request is not valid."
}
export declare enum ErrorCode {
CACHE_EXCEPTION = "CACHE_EXCEPTION",
INVALID_TOKEN_FORMAT = "INVALID_TOKEN_FORMAT",
INVALID_CREDENTIAL = "INVALID_CREDENTIAL",
INVALID_INPUT = "INVALID_INPUT",
INVALID_PAYLOAD = "INVALID_PAYLOAD",
MAINTENANCE = "MAINTENANCE",
FORBIDDEN = "FORBIDDEN",
QUERY_EXCEPTION = "QUERY_EXCEPTION",
UNEXPECTED_ERROR = "UNEXPECTED_ERROR",
UNHANDLED_EXCEPTION = "UNHANDLED_EXCEPTION",
IMPLEMENTATION_EXCEPTION = "IMPLEMENTATION_EXCEPTION",
UNIMPLEMENTED_EXCEPTION = "UNIMPLEMENTED_EXCEPTION",
CLIENT_EXCEPTION = "CLIENT_EXCEPTION",
SERVER_EXCEPTION = "SERVER_EXCEPTION",
UNAUTHORIZED = "UNAUTHORIZED",
UNAUTHENTICATED = "UNAUTHENTICATED",
API_KEY_INVALID = "API_KEY_INVALID",
NOT_FOUND = "NOT_FOUND",
BAD_GATEWAY = "BAD_GATEWAY",
CONFIG_EXCEPTION = "CONFIG_EXCEPTION",
INVALID_ARGUMENT = "INVALID_ARGUMENT"
}