Added error checking for file creation in create metadata endpoint #154

Merged
kdeng00 merged 7 commits from create_metadata_fix into v0.2 2025-07-14 19:42:07 -04:00
Showing only changes of commit 2c0e3d290c - Show all commits
+6 -2
View File
@@ -799,7 +799,8 @@ pub mod endpoint {
(axum::http::StatusCode::OK, axum::Json(response)) (axum::http::StatusCode::OK, axum::Json(response))
} }
Err(err) => { Err(err) => {
response.message = format!("{:?} song {:?}", err.to_string(), song); response.message =
format!("{:?} song {:?}", err.to_string(), song);
(axum::http::StatusCode::BAD_REQUEST, axum::Json(response)) (axum::http::StatusCode::BAD_REQUEST, axum::Json(response))
} }
}, },
@@ -811,7 +812,10 @@ pub mod endpoint {
} }
Err(err) => { Err(err) => {
response.message = err.to_string(); response.message = err.to_string();
(axum::http::StatusCode::INTERNAL_SERVER_ERROR, axum::Json(response)) (
axum::http::StatusCode::INTERNAL_SERVER_ERROR,
axum::Json(response),
)
} }
} }
} }