fix http error code for PUT /obj
parent
9261aac086
commit
105a9c7e0b
|
@ -127,7 +127,7 @@ pub async fn put_object(
|
||||||
body.extend_from_slice(&chunk);
|
body.extend_from_slice(&chunk);
|
||||||
}
|
}
|
||||||
|
|
||||||
let entry = serde_json::from_slice::<Entry>(&body)?;
|
let entry = serde_json::from_slice::<Entry>(&body).map_err(ErrorBadRequest)?;
|
||||||
|
|
||||||
let result_address = insert_entry(&connection, entry).map_err(ErrorInternalServerError)?;
|
let result_address = insert_entry(&connection, entry).map_err(ErrorInternalServerError)?;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue