Fix query params giving plain text error (#509)
This commit is contained in:
parent
7d195367a8
commit
1611049623
@ -271,6 +271,12 @@ async fn main() -> std::io::Result<()> {
|
|||||||
dotenvy::var("RATE_LIMIT_IGNORE_KEY").ok(),
|
dotenvy::var("RATE_LIMIT_IGNORE_KEY").ok(),
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
.app_data(web::QueryConfig::default().error_handler(|err, _req| {
|
||||||
|
routes::ApiError::Validation(err.to_string()).into()
|
||||||
|
}))
|
||||||
|
.app_data(web::JsonConfig::default().error_handler(|err, _req| {
|
||||||
|
routes::ApiError::Validation(err.to_string()).into()
|
||||||
|
}))
|
||||||
.app_data(web::Data::new(pool.clone()))
|
.app_data(web::Data::new(pool.clone()))
|
||||||
.app_data(web::Data::new(file_host.clone()))
|
.app_data(web::Data::new(file_host.clone()))
|
||||||
.app_data(web::Data::new(search_config.clone()))
|
.app_data(web::Data::new(search_config.clone()))
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user