Skip to content

Commit 9c07f43

Browse files
authored
Handle collection not found response in update_collection (#450)
1 parent 9ad880a commit 9c07f43

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

core/operations/management/collection_update.cxx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,10 @@ collection_update_request::make_response(error_context::http&& ctx, const encode
5858
} break;
5959
case 404: {
6060
std::regex scope_not_found("Scope with name .+ is not found");
61-
if (std::regex_search(encoded.body.data(), scope_not_found)) {
61+
std::regex collection_not_found("Collection with name .+ is not found");
62+
if (std::regex_search(encoded.body.data(), collection_not_found)) {
63+
response.ctx.ec = errc::common::collection_not_found;
64+
} else if (std::regex_search(encoded.body.data(), scope_not_found)) {
6265
response.ctx.ec = errc::common::scope_not_found;
6366
} else {
6467
response.ctx.ec = errc::common::bucket_not_found;

0 commit comments

Comments
 (0)