Skip to content

Commit 9ab823e

Browse files
authored
Avoid overriding the exception message with the raw message (#1516)
1 parent 42ff0fd commit 9ab823e

File tree

5 files changed

+0
-39
lines changed

5 files changed

+0
-39
lines changed

src/Exception/AccessDeniedException.php

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,10 @@
33
namespace AsyncAws\RdsDataService\Exception;
44

55
use AsyncAws\Core\Exception\Http\ClientException;
6-
use Symfony\Contracts\HttpClient\ResponseInterface;
76

87
/**
98
* You do not have sufficient access to perform this action.
109
*/
1110
final class AccessDeniedException extends ClientException
1211
{
13-
protected function populateResult(ResponseInterface $response): void
14-
{
15-
$data = $response->toArray(false);
16-
17-
if (null !== $v = (isset($data['message']) ? (string) $data['message'] : null)) {
18-
$this->message = $v;
19-
}
20-
}
2112
}

src/Exception/BadRequestException.php

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,10 @@
33
namespace AsyncAws\RdsDataService\Exception;
44

55
use AsyncAws\Core\Exception\Http\ClientException;
6-
use Symfony\Contracts\HttpClient\ResponseInterface;
76

87
/**
98
* There is an error in the call or in a SQL statement.
109
*/
1110
final class BadRequestException extends ClientException
1211
{
13-
protected function populateResult(ResponseInterface $response): void
14-
{
15-
$data = $response->toArray(false);
16-
17-
if (null !== $v = (isset($data['message']) ? (string) $data['message'] : null)) {
18-
$this->message = $v;
19-
}
20-
}
2112
}

src/Exception/ForbiddenException.php

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,10 @@
33
namespace AsyncAws\RdsDataService\Exception;
44

55
use AsyncAws\Core\Exception\Http\ClientException;
6-
use Symfony\Contracts\HttpClient\ResponseInterface;
76

87
/**
98
* There are insufficient privileges to make the call.
109
*/
1110
final class ForbiddenException extends ClientException
1211
{
13-
protected function populateResult(ResponseInterface $response): void
14-
{
15-
$data = $response->toArray(false);
16-
17-
if (null !== $v = (isset($data['message']) ? (string) $data['message'] : null)) {
18-
$this->message = $v;
19-
}
20-
}
2112
}

src/Exception/NotFoundException.php

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,10 @@
33
namespace AsyncAws\RdsDataService\Exception;
44

55
use AsyncAws\Core\Exception\Http\ClientException;
6-
use Symfony\Contracts\HttpClient\ResponseInterface;
76

87
/**
98
* The `resourceArn`, `secretArn`, or `transactionId` value can't be found.
109
*/
1110
final class NotFoundException extends ClientException
1211
{
13-
protected function populateResult(ResponseInterface $response): void
14-
{
15-
$data = $response->toArray(false);
16-
17-
if (null !== $v = (isset($data['message']) ? (string) $data['message'] : null)) {
18-
$this->message = $v;
19-
}
20-
}
2112
}

src/Exception/StatementTimeoutException.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,6 @@ protected function populateResult(ResponseInterface $response): void
2626
{
2727
$data = $response->toArray(false);
2828

29-
if (null !== $v = (isset($data['message']) ? (string) $data['message'] : null)) {
30-
$this->message = $v;
31-
}
3229
$this->dbConnectionId = isset($data['dbConnectionId']) ? (int) $data['dbConnectionId'] : null;
3330
}
3431
}

0 commit comments

Comments
 (0)