Skip to content

Commit 5592841

Browse files
authored
[catalog] Fix namespace creation error status (#1248)
## Which issue does this PR close? - Closes #1247 ## What changes are included in this PR? According to the [openapi spec](#1247), already existed error should return 409 (Conflict) status code. ## Are these changes tested? I checked with cargo test and doesn't find any breakage.
1 parent 841ef0a commit 5592841

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

crates/catalog/rest/src/catalog.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -403,7 +403,7 @@ impl Catalog for RestCatalog {
403403
deserialize_catalog_response::<NamespaceSerde>(http_response).await?;
404404
Namespace::try_from(response)
405405
}
406-
StatusCode::NOT_FOUND => Err(Error::new(
406+
StatusCode::CONFLICT => Err(Error::new(
407407
ErrorKind::Unexpected,
408408
"Tried to create a namespace that already exists",
409409
)),

0 commit comments

Comments
 (0)