diff --git a/alternator/executor.cc b/alternator/executor.cc index 7488e58b5d..e4198f6c68 100644 --- a/alternator/executor.cc +++ b/alternator/executor.cc @@ -275,6 +275,10 @@ future executor::create_table(sstring content) { supplement_table_info(table_info, *schema); status[TABLE_DESCRIPTION] = std::move(table_info); return make_ready_future(make_jsonable(std::move(status))); + }).handle_exception_type([table_name = std::move(table_name)] (exceptions::already_exists_exception&) { + return make_exception_future( + api_error(reply::status_type::bad_request, "ResourceInUseException", + format("Table {} already exists", table_name))); }); }