alternator: add "LimitExceededException" error type
This patch adds to Alternator's api_error type yet another type of error, api_error::limit_exceeded (error code "LimitExceededException"). DynamoDB returns this error code in certain situations where certain low limits were exceeded, such as the case we'll need in a following patch - an UpdateTable that tries to create more than one GSI at once. The LimitExceededException error type should not be confused with other similarly-named but different error messages like ProvisionedThroughputExceededException or RequestLimitExceeded. In general, we make an attempt to return the same error code that DynamoDB returns for a given error. Signed-off-by: Nadav Har'El <nyh@scylladb.com>
This commit is contained in:
@@ -88,6 +88,9 @@ public:
|
||||
static api_error table_not_found(std::string msg) {
|
||||
return api_error("TableNotFoundException", std::move(msg));
|
||||
}
|
||||
static api_error limit_exceeded(std::string msg) {
|
||||
return api_error("LimitExceededException", std::move(msg));
|
||||
}
|
||||
static api_error internal(std::string msg) {
|
||||
return api_error("InternalServerError", std::move(msg), http::reply::status_type::internal_server_error);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user