mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-09 15:27:54 +00:00
chore(rust): correctly format values in errors
This commit is contained in:
parent
347add8998
commit
7737850afb
15 changed files with 54 additions and 62 deletions
|
|
@ -52,7 +52,7 @@ pub fn ratelimiter<F, T>(f: F) -> FromFnLayer<F, Option<RedisPool>, T> {
|
|||
.await
|
||||
{
|
||||
Ok(_) => info!("connected to redis for request rate limiting"),
|
||||
Err(err) => error!("could not load redis script: {}", err),
|
||||
Err(error) => error!(?error, "could not load redis script"),
|
||||
}
|
||||
} else {
|
||||
error!("could not wait for connection to load redis script!");
|
||||
|
|
@ -212,8 +212,8 @@ pub async fn do_request_ratelimited(
|
|||
|
||||
return response;
|
||||
}
|
||||
Err(err) => {
|
||||
tracing::error!("error getting ratelimit info: {}", err);
|
||||
Err(error) => {
|
||||
tracing::error!(?error, "error getting ratelimit info");
|
||||
return json_err(
|
||||
StatusCode::INTERNAL_SERVER_ERROR,
|
||||
r#"{"message": "500: internal server error", "code": 0}"#.to_string(),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue