mirror of
https://github.com/scylladb/scylladb.git
synced 2026-05-12 19:02:12 +00:00
alternator: correct error when trying to CreateTable an existing table
Signed-off-by: Nadav Har'El <nyh@scylladb.com>
This commit is contained in:
@@ -275,6 +275,10 @@ future<json::json_return_type> executor::create_table(sstring content) {
|
||||
supplement_table_info(table_info, *schema);
|
||||
status[TABLE_DESCRIPTION] = std::move(table_info);
|
||||
return make_ready_future<json::json_return_type>(make_jsonable(std::move(status)));
|
||||
}).handle_exception_type([table_name = std::move(table_name)] (exceptions::already_exists_exception&) {
|
||||
return make_exception_future<json::json_return_type>(
|
||||
api_error(reply::status_type::bad_request, "ResourceInUseException",
|
||||
format("Table {} already exists", table_name)));
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user