Skip to content

Commit f1f0658

Browse files
authored
Support KMS_ACCOUNT_ISSUE error (#107)
1 parent 8327ee2 commit f1f0658

File tree

3 files changed

+12
-0
lines changed

3 files changed

+12
-0
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 4.1.0
2+
3+
- Added `KmsException` for `KmsAccountIssue`.
4+
15
## 4.0.1
26

37
- Added header to TSP and Logdriver calls with the current TSC version and language. These can be consumed in TSP metrics and are useful to track migrations or find out of date TSC callers.

src/TenantSecurityException.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ export enum TenantSecurityErrorCode {
2222
KMS_CONFIGURATION_INVALID = 207,
2323
KMS_UNREACHABLE = 208,
2424
KMS_THROTTLED = 209,
25+
KMS_ACCOUNT_ISSUE = 210,
2526

2627
// map to SecurityEventException
2728
SECURITY_EVENT_REJECTED = 301,

src/kms/tests/KmsException.test.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,11 @@ describe("UNIT KmsException", () => {
1818
expect(error.httpResponseCode).toEqual(429);
1919
expect(error.message).toEqual("totally real error message.");
2020
});
21+
22+
test("Understands error 210", () => {
23+
const error = new KmsException(210, "totally real error message.", 429);
24+
expect(error.errorCode).toEqual(TenantSecurityErrorCode.KMS_ACCOUNT_ISSUE);
25+
expect(error.httpResponseCode).toEqual(429);
26+
expect(error.message).toEqual("totally real error message.");
27+
});
2128
});

0 commit comments

Comments
 (0)