Prevent Nix from retrying if the GH backend errors out
This commit is contained in:
parent
a6692a364e
commit
f698478b4f
|
@ -25,7 +25,8 @@ pub enum Error {
|
||||||
impl IntoResponse for Error {
|
impl IntoResponse for Error {
|
||||||
fn into_response(self) -> Response {
|
fn into_response(self) -> Response {
|
||||||
let code = match &self {
|
let code = match &self {
|
||||||
Self::ApiError(_) => StatusCode::INTERNAL_SERVER_ERROR,
|
// HACK: HTTP 418 makes Nix throw a visible error but not retry
|
||||||
|
Self::ApiError(_) => StatusCode::IM_A_TEAPOT,
|
||||||
Self::NotFound => StatusCode::NOT_FOUND,
|
Self::NotFound => StatusCode::NOT_FOUND,
|
||||||
Self::BadRequest => StatusCode::BAD_REQUEST,
|
Self::BadRequest => StatusCode::BAD_REQUEST,
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue