fix: ParseRequestError::InvalidFilesMap now is dyn std::error::Error
This commit is contained in:
parent
c1cc30d421
commit
800eb4b10a
|
@ -216,7 +216,7 @@ pub enum ParseRequestError {
|
|||
|
||||
/// The request's files map was invalid.
|
||||
#[error("Invalid files map: {0}")]
|
||||
InvalidFilesMap(serde_json::Error),
|
||||
InvalidFilesMap(Box<dyn std::error::Error>),
|
||||
|
||||
/// The request's multipart data was invalid.
|
||||
#[error("Invalid multipart data")]
|
||||
|
|
|
@ -77,7 +77,7 @@ pub(super) async fn receive_batch_multipart(
|
|||
let map_str = field.text().await?;
|
||||
map = Some(
|
||||
serde_json::from_str::<HashMap<String, Vec<String>>>(&map_str)
|
||||
.map_err(ParseRequestError::InvalidFilesMap)?,
|
||||
.map_err(|e| ParseRequestError::InvalidFilesMap(Box::new(e)))?,
|
||||
);
|
||||
}
|
||||
_ => {
|
||||
|
|
Loading…
Reference in New Issue
Block a user