Skip to content

Commit 3d01e74

Browse files
committed
Treat NamespaceDoesntExist as 404
Signed-off-by: Piotr Jastrzebski <[email protected]>
1 parent 9a6e342 commit 3d01e74

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

libsql-server/src/error.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ impl IntoResponse for &Error {
185185
QueryError(_) => self.format_err(StatusCode::BAD_REQUEST),
186186
InvalidHost(_) => self.format_err(StatusCode::BAD_REQUEST),
187187
InvalidPath(_) => self.format_err(StatusCode::BAD_REQUEST),
188-
NamespaceDoesntExist(_) => self.format_err(StatusCode::BAD_REQUEST),
188+
NamespaceDoesntExist(_) => self.format_err(StatusCode::NOT_FOUND),
189189
PrimaryConnectionTimeout => self.format_err(StatusCode::INTERNAL_SERVER_ERROR),
190190
NamespaceAlreadyExist(_) => self.format_err(StatusCode::BAD_REQUEST),
191191
InvalidNamespace => self.format_err(StatusCode::BAD_REQUEST),

0 commit comments

Comments
 (0)