Skip to content

Commit f7d5614

Browse files
authored
fix: incorrect error type being thrown, leading to unexpected dependency requirement (#513)
1 parent 4237b63 commit f7d5614

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

common/lib/plugins/bluegreen/routing/suspend_connect_routing.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ import { BlueGreenStatus } from "../blue_green_status";
2828
import { convertMsToNanos, convertNanosToMs, getTimeInNanos } from "../../../utils/utils";
2929
import { WrapperProperties } from "../../../wrapper_property";
3030
import { BlueGreenPhase } from "../blue_green_phase";
31-
import { TimeoutError } from "@opentelemetry/sdk-metrics";
3231
import { BlueGreenRole } from "../blue_green_role";
32+
import { AwsWrapperError } from "../../../utils/errors";
3333

3434
export class SuspendConnectRouting extends BaseConnectRouting {
3535
private static readonly TELEMETRY_SWITCHOVER = "Blue/Green switchover";
@@ -71,7 +71,7 @@ export class SuspendConnectRouting extends BaseConnectRouting {
7171
}
7272

7373
if (bgStatus != null && bgStatus.currentPhase === BlueGreenPhase.IN_PROGRESS) {
74-
throw new TimeoutError(Messages.get("Bgd.inProgressTryConnectLater", `${WrapperProperties.BG_CONNECT_TIMEOUT_MS.get(properties)}`));
74+
throw new AwsWrapperError(Messages.get("Bgd.inProgressTryConnectLater", `${WrapperProperties.BG_CONNECT_TIMEOUT_MS.get(properties)}`));
7575
}
7676

7777
logger.debug(Messages.get("Bgd.switchoverCompleteContinueWithConnect", `${convertNanosToMs(getTimeInNanos() - suspendStartTime)}`));

0 commit comments

Comments
 (0)