Skip to content

Commit 75601a7

Browse files
authored
Add support for KMS_ACCOUNT_ISSUE. (#39)
* Add new error code for KmsAccountIssue * CHANGELOG entry
1 parent 1fc4aba commit 75601a7

3 files changed

Lines changed: 10 additions & 0 deletions

File tree

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Changelog
22

3+
## v0.4.0
4+
5+
- Support TSP error code for KMS_ACCOUNT_ISSUE.
6+
37
## v0.3.0
48

59
- Restricted visibility of some methods intended for internal use only

src/Exception/TenantSecurityException.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,11 @@ public static function fromDecodedJson(array $decodedJson)
9999
"KmsThrottled: Request to KMS failed because KMS throttled the Tenant Security Proxy.",
100100
$code
101101
);
102+
case 210:
103+
return new KmsException(
104+
"KmsAccountIssue: Request to KMS failed because of an issue with the KMS account.",
105+
$code
106+
);
102107
case 301:
103108
return new SecurityEventException(
104109
"SecurityEventRejected: Tenant Security Proxy could not accept the security event.",

tests/Exception/TenantSecurityExceptionTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ public function testForAllKnownCodes(): void
4444
$this->assertEquals(self::createExceptionForCode(207)->getCode(), 207);
4545
$this->assertEquals(self::createExceptionForCode(208)->getCode(), 208);
4646
$this->assertEquals(self::createExceptionForCode(209)->getCode(), 209);
47+
$this->assertEquals(self::createExceptionForCode(210)->getCode(), 210);
4748
$this->assertEquals(self::createExceptionForCode(301)->getCode(), 301);
4849
}
4950

0 commit comments

Comments
 (0)