We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
fdca76e
error_handler
use actix_msgpack::MsgPackConfig; use actix_web::{HttpResponse, HttpServer, App, web::Data}; #[actix_web::main] async fn main() { HttpServer::new(|| { let mut config = MsgPackConfig::default(); config.error_handler(|err, _req| { InternalError::from_response(err, HttpResponse::BadRequest().finish()).into() }); App::new().app_data(Data::new(config)).service(...) } }