inline problem_details builder at call sites; drop the one-caller wrapper
This commit is contained in:
parent
cdf1bfe7db
commit
2b0c51badf
8 changed files with 79 additions and 78 deletions
|
|
@ -16,7 +16,9 @@ use axum::{
|
|||
use hive_sh4re::Approval;
|
||||
use serde::Deserialize;
|
||||
|
||||
use super::{AppState, error_response, problem_response};
|
||||
use problem_details::ProblemDetails;
|
||||
|
||||
use super::{AppState, error_response};
|
||||
use crate::actions;
|
||||
use crate::coordinator::Coordinator;
|
||||
use crate::lifecycle;
|
||||
|
|
@ -210,10 +212,9 @@ pub(super) async fn get_approval_diff(
|
|||
.map(|n| format!("refs/tags/proposal/{n}"))
|
||||
}
|
||||
other => {
|
||||
return problem_response(
|
||||
StatusCode::BAD_REQUEST,
|
||||
&format!("unknown diff base {other:?}"),
|
||||
);
|
||||
return ProblemDetails::from_status_code(StatusCode::BAD_REQUEST)
|
||||
.with_detail(format!("unknown diff base {other:?}"))
|
||||
.into_response();
|
||||
}
|
||||
};
|
||||
let Some(base_ref) = base_ref else {
|
||||
|
|
|
|||
Loading…
Reference in a new issue