Skip to content

Commit c3c6dc0

Browse files
authored
fix: incorrect error type being thrown, leading to unexpected dependency requirement (#515)
1 parent ce515ff commit c3c6dc0

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@ import { BlueGreenStatus } from "../blue_green_status";
2626
import { convertMsToNanos, convertNanosToMs, getTimeInNanos } from "../../../utils/utils";
2727
import { WrapperProperties } from "../../../wrapper_property";
2828
import { BlueGreenPhase } from "../blue_green_phase";
29-
import { TimeoutError } from "@opentelemetry/sdk-metrics";
3029
import { ConnectionPlugin } from "../../../connection_plugin";
3130
import { RoutingResultHolder } from "./execute_routing";
31+
import { AwsWrapperError } from "../../../utils/errors";
3232

3333
export class SuspendExecuteRouting extends BaseExecuteRouting {
3434
protected static readonly TELEMETRY_SWITCHOVER: string = "Blue/Green switchover";
@@ -70,7 +70,7 @@ export class SuspendExecuteRouting extends BaseExecuteRouting {
7070
}
7171

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

7676
logger.debug(Messages.get("Bgd.switchoverCompletedContinueWithMethod", methodName, `${convertNanosToMs(getTimeInNanos() - suspendStartTime)}`));

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

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

3434
export class SuspendUntilCorrespondingHostFoundConnectRouting extends BaseConnectRouting {
3535
protected static readonly TELEMETRY_SWITCHOVER: string = "Blue/Green switchover";
@@ -81,7 +81,7 @@ export class SuspendUntilCorrespondingHostFoundConnectRouting extends BaseConnec
8181
if (!bgStatus || bgStatus.currentPhase === BlueGreenPhase.COMPLETED) {
8282
logger.debug(Messages.get("Bgd.completedContinueWithConnect", `${convertNanosToMs(getTimeInNanos() - suspendStartTime)}`));
8383
} else if (getTimeInNanos() > endTime) {
84-
throw new TimeoutError(
84+
throw new AwsWrapperError(
8585
Messages.get("Bgd.correspondingHostNotFoundTryConnectLater", hostInfo.host, `${WrapperProperties.BG_CONNECT_TIMEOUT_MS.get(properties)}`)
8686
);
8787
}

0 commit comments

Comments
 (0)