Skip to content

Commit

Permalink
Return 404 when task disappears
Browse files Browse the repository at this point in the history
  • Loading branch information
jpommerening committed Apr 7, 2021
1 parent a15e3e1 commit 0247b20
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion api/src/apps/routes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,9 @@ fn status_change(

match runtime.block_on(spawn_with_options(options, future))? {
Poll::Pending => Ok(AsyncCompletion::Pending(app_name, status_id)),
Poll::Ready(Ok(services)) => Ok(AsyncCompletion::Ready(Json(services))),
Poll::Ready(Ok(_)) => Err(HttpApiProblem::with_title_and_type_from_status(
StatusCode::NOT_FOUND,
)),
Poll::Ready(Err(err)) => Err(HttpApiProblem::from(err)),
}
}
Expand Down

0 comments on commit 0247b20

Please sign in to comment.