Create the remaining task api methods on the server. (#3)

Create the remaining task api methods along with hurl tests for each.

Reviewed-on: #3
Co-authored-by: Drew Galbraith <drew@tiramisu.one>
Co-committed-by: Drew Galbraith <drew@tiramisu.one>
This commit is contained in:
Drew 2025-09-20 19:23:19 +00:00 committed by Drew
parent d32f6be813
commit ef247e6e29
5 changed files with 457 additions and 3 deletions

View file

@ -13,6 +13,7 @@ pub enum AppError {
InternalError(anyhow::Error),
JsonExtractError(JsonRejection),
PathError(PathRejection),
Unprocessable(String),
NotFound,
}
@ -36,6 +37,11 @@ impl IntoResponse for AppError {
}),
)
.into_response(),
Self::Unprocessable(msg) => (
StatusCode::UNPROCESSABLE_ENTITY,
Json(ErrorJson { error: msg }),
)
.into_response(),
Self::PathError(rej) => (
StatusCode::BAD_REQUEST,
Json(ErrorJson {