mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-06 05:25:44 +01:00
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:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user