Skip to content

Commit

Permalink
Add message to auth exception callback
Browse files Browse the repository at this point in the history
  • Loading branch information
keithbrink committed Oct 8, 2021
1 parent 9addff4 commit a2facf3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Exceptions/AuthenticationException.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ class AuthenticationException extends AmznSPAException
{
public function __construct(Response $response = null, ?Closure $callback = null)
{
$message = $response ? $this->getMessageFromResponse($response) : '';

if ($callback) {
$callback($response);
$callback($response, $message);
}

$message = $response ? $this->getMessageFromResponse($response) : '';

parent::__construct($message);
}

Expand Down

0 comments on commit a2facf3

Please sign in to comment.