Return 410 Gone (rather than 500) if an output is no longer available
This commit is contained in:
@ -84,10 +84,8 @@ sub pkg : Chained('nix') PathPart Args(1) {
|
||||
|| notFound($c, "No such package in this channel.");
|
||||
}
|
||||
|
||||
unless (all { isValidPath($_->path) } $c->stash->{build}->buildoutputs->all) {
|
||||
$c->response->status(410); # "Gone"
|
||||
error($c, "Build " . $c->stash->{build}->id . " is no longer available.");
|
||||
}
|
||||
gone($c, "Build " . $c->stash->{build}->id . " is no longer available.")
|
||||
unless all { isValidPath($_->path) } $c->stash->{build}->buildoutputs->all;
|
||||
|
||||
$c->stash->{manifestUri} = $c->uri_for($self->action_for("manifest"), $c->req->captures);
|
||||
|
||||
|
Reference in New Issue
Block a user