From a6878c8b6b187c518f7ef268d522c556f4007e10 Mon Sep 17 00:00:00 2001 From: Chris Lu Date: Tue, 17 Mar 2026 14:42:34 -0700 Subject: [PATCH] Match Go PostHandler: return 500 for all write errors Go returns 500 (InternalServerError) for all write failures. Rust was returning 404 for volume-not-found and 403 for read-only volumes. --- seaweed-volume/src/server/handlers.rs | 6 ------ 1 file changed, 6 deletions(-) diff --git a/seaweed-volume/src/server/handlers.rs b/seaweed-volume/src/server/handlers.rs index 7f7f75d7c..f67587ebb 100644 --- a/seaweed-volume/src/server/handlers.rs +++ b/seaweed-volume/src/server/handlers.rs @@ -2310,12 +2310,6 @@ pub async fn post_handler( resp } } - Err(crate::storage::volume::VolumeError::NotFound) => { - json_error_with_query(StatusCode::NOT_FOUND, "volume not found", Some(&query)) - } - Err(crate::storage::volume::VolumeError::ReadOnly) => { - json_error_with_query(StatusCode::FORBIDDEN, "volume is read-only", Some(&query)) - } Err(e) => { metrics::HANDLER_COUNTER .with_label_values(&[metrics::ERROR_WRITE_TO_LOCAL_DISK])