Skip to content

Commit b05af41

Browse files
authored
Avoid overriding the exception message with the raw message (#1516)
1 parent 11106ac commit b05af41

13 files changed

+0
-111
lines changed

src/Exception/ExecutionAlreadyExistsException.php

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

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

87
/**
98
* The execution has the same `name` as another execution (but a different `input`).
@@ -12,12 +11,4 @@
1211
*/
1312
final class ExecutionAlreadyExistsException extends ClientException
1413
{
15-
protected function populateResult(ResponseInterface $response): void
16-
{
17-
$data = $response->toArray(false);
18-
19-
if (null !== $v = (isset($data['message']) ? (string) $data['message'] : null)) {
20-
$this->message = $v;
21-
}
22-
}
2314
}

src/Exception/ExecutionDoesNotExistException.php

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

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

87
/**
98
* The specified execution does not exist.
109
*/
1110
final class ExecutionDoesNotExistException 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/ExecutionLimitExceededException.php

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

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

87
/**
98
* The maximum number of running executions has been reached. Running executions must end or be stopped before a new
109
* execution can be started.
1110
*/
1211
final class ExecutionLimitExceededException extends ClientException
1312
{
14-
protected function populateResult(ResponseInterface $response): void
15-
{
16-
$data = $response->toArray(false);
17-
18-
if (null !== $v = (isset($data['message']) ? (string) $data['message'] : null)) {
19-
$this->message = $v;
20-
}
21-
}
2213
}

src/Exception/InvalidArnException.php

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

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

87
/**
98
* The provided Amazon Resource Name (ARN) is not valid.
109
*/
1110
final class InvalidArnException 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/InvalidExecutionInputException.php

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

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

87
/**
98
* The provided JSON input data is not valid.
109
*/
1110
final class InvalidExecutionInputException 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/InvalidNameException.php

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

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

87
/**
98
* The provided name is not valid.
109
*/
1110
final class InvalidNameException 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/InvalidOutputException.php

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

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

87
/**
98
* The provided JSON output data is not valid.
109
*/
1110
final class InvalidOutputException 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/InvalidTokenException.php

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

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

87
/**
98
* The provided token is not valid.
109
*/
1110
final class InvalidTokenException 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/StateMachineDeletingException.php

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

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

87
/**
98
* The specified state machine is being deleted.
109
*/
1110
final class StateMachineDeletingException 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/StateMachineDoesNotExistException.php

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

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

87
/**
98
* The specified state machine does not exist.
109
*/
1110
final class StateMachineDoesNotExistException 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
}

0 commit comments

Comments
 (0)