Do not fail on error 502 during restart actions (#1941)

In some rare cases a reverse proxy stops forwarding traffic to scm,
before the response is returned to scm.
In such a case the reverse proxy returns 502 (bad gateway),
so we treat 502 not as error for restart actions.

Co-authored-by: Eduard Heimbuch <eduard.heimbuch@cloudogu.com>
This commit is contained in:
Sebastian Sdorra
2022-02-02 10:02:46 +01:00
committed by GitHub
parent c155d1eb4a
commit dff5d3aa5b
5 changed files with 116 additions and 70 deletions

View File

@@ -79,6 +79,15 @@ export class UnauthorizedError extends Error {
}
}
export class BadGatewayError extends Error {
statusCode: number;
constructor(message: string, statusCode: number) {
super(message);
this.statusCode = statusCode;
}
}
export class TokenExpiredError extends UnauthorizedError {}
export class ForbiddenError extends Error {