Update actix deps
This commit is contained in:
parent
a5dc3afb82
commit
a317f1eabe
|
@ -1,7 +1,7 @@
|
|||
[package]
|
||||
name = "actix-form-data"
|
||||
description = "Multipart Form Data for Actix Web"
|
||||
version = "0.6.0-beta.1"
|
||||
version = "0.6.0-beta.2"
|
||||
license = "GPL-3.0"
|
||||
authors = ["asonix <asonix@asonix.dog>"]
|
||||
repository = "https://git.asonix.dog/Aardwolf/actix-form-data.git"
|
||||
|
|
11
src/error.rs
11
src/error.rs
|
@ -24,9 +24,10 @@ use std::{
|
|||
|
||||
use actix_multipart::MultipartError;
|
||||
use actix_web::{
|
||||
dev::Body,
|
||||
error::{PayloadError, ResponseError},
|
||||
http::StatusCode,
|
||||
HttpResponse,
|
||||
BaseHttpResponse,
|
||||
};
|
||||
|
||||
#[derive(Debug, thiserror::Error)]
|
||||
|
@ -83,14 +84,14 @@ impl ResponseError for Error {
|
|||
}
|
||||
}
|
||||
|
||||
fn error_response(&self) -> HttpResponse {
|
||||
fn error_response(&self) -> BaseHttpResponse<Body> {
|
||||
match *self {
|
||||
Error::FileFn(ref e) => ResponseError::error_response(e.as_response_error()),
|
||||
Error::Payload(ref e) => ResponseError::error_response(e),
|
||||
Error::Multipart(_)
|
||||
| Error::ParseField(_)
|
||||
| Error::ParseInt(_)
|
||||
| Error::ParseFloat(_) => HttpResponse::BadRequest().finish(),
|
||||
| Error::ParseFloat(_) => BaseHttpResponse::bad_request(),
|
||||
Error::ContentType
|
||||
| Error::ContentDisposition
|
||||
| Error::Field
|
||||
|
@ -99,9 +100,9 @@ impl ResponseError for Error {
|
|||
| Error::FieldType
|
||||
| Error::Filename
|
||||
| Error::FileCount
|
||||
| Error::FileSize => HttpResponse::BadRequest().finish(),
|
||||
| Error::FileSize => BaseHttpResponse::bad_request(),
|
||||
Error::MissingMiddleware | Error::TxDropped => {
|
||||
HttpResponse::InternalServerError().finish()
|
||||
BaseHttpResponse::internal_server_error()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue