Skip to content

Commit 06df3c6

Browse files
committed
throw correct error for failing to get the KV arn
1 parent 92b8177 commit 06df3c6

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/api/functions/cloudfrontKvStore.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import {
1111
DatabaseDeleteError,
1212
DatabaseFetchError,
1313
DatabaseInsertError,
14+
InternalServerError,
1415
} from "common/errors/index.js";
1516
import { RunEnvironment } from "common/roles.js";
1617
import "@aws-sdk/signature-v4-crt";
@@ -145,7 +146,7 @@ export const getLinkryKvArn = async (runEnvironment: RunEnvironment) => {
145146
if (environmentConfig[runEnvironment].LinkryCloudfrontKvArn) {
146147
return environmentConfig[runEnvironment].LinkryCloudfrontKvArn;
147148
}
148-
throw new DatabaseInsertError({
149+
throw new InternalServerError({
149150
message: "Could not find the Cloudfront Key-Value store ARN",
150151
});
151152
};

0 commit comments

Comments
 (0)