Skip to content
Snippets Groups Projects
Verified Commit 9781553b authored by Nicolas Werner's avatar Nicolas Werner
Browse files

Add exclusive error code

parent ddc00614
No related branches found
No related tags found
No related merge requests found
Pipeline #2536 failed
......@@ -56,6 +56,9 @@ enum class ErrorCode
M_MISSING_TOKEN,
//! One of the uploaded signatures was invalid
M_INVALID_SIGNATURE,
//! The resource being requested is reserved by an application service, or the application
//! service making the request has not created the resource.
M_EXCLUSIVE,
};
//! Convert an error code into a string.
......
......@@ -44,6 +44,8 @@ to_string(ErrorCode code)
return "M_MISSING_TOKEN";
case ErrorCode::M_INVALID_SIGNATURE:
return "M_INVALID_SIGNATURE";
case ErrorCode::M_EXCLUSIVE:
return "M_EXCLUSIVE";
case ErrorCode::M_UNKNOWN:
return "M_UNKNOWN";
}
......@@ -86,6 +88,8 @@ from_string(const std::string &code)
return ErrorCode::M_MISSING_TOKEN;
else if (code == "M_INVALID_SIGNATURE")
return ErrorCode::M_INVALID_SIGNATURE;
else if (code == "M_EXCLUSIVE")
return ErrorCode::M_EXCLUSIVE;
else if (code == "M_UNKNOWN")
return ErrorCode::M_UNKNOWN;
else // if (code == "M_UNRECOGNIZED")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment