Added query parameters.

This commit is contained in:
2026-09-26 20:19:06 +02:00
parent 9279258ff1
commit 859ae71c51
12 changed files with 172 additions and 20 deletions
+6 -3
View File
@@ -29,15 +29,18 @@ impl IntoResponse for AppError {
Self::NotFound => {
return error_response(StatusCode::NOT_FOUND, "Not found");
}
Self::Validation(error) => {
return error_response(StatusCode::UNPROCESSABLE_ENTITY, error.to_string());
}
Self::Repository(RepositoryError::Database(error)) => {
tracing::error!(%error, "Database query failed");
}
Self::Repository(RepositoryError::Decode(error)) => {
tracing::error!(%error, "Invalid stored data");
}
Self::Repository(RepositoryError::QueryConversion(error)) => {
return error_response(StatusCode::BAD_REQUEST, error.to_string());
}
Self::Validation(error) => {
return error_response(StatusCode::UNPROCESSABLE_ENTITY, error.to_string());
}
}
error_response(StatusCode::INTERNAL_SERVER_ERROR, "Internal server error")