Skip to content

Commit

Permalink
Issue #35026 - throw exception on token decryption error
Browse files Browse the repository at this point in the history
  • Loading branch information
balintdozsa committed Apr 8, 2021
1 parent 96408a8 commit f86e75b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/NavOnlineInvoice/Api30/Reporter.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ public function tokenExchange()

$token = $this->decodeToken($encodedToken);

if (empty($token)) {
throw new TokenExchangeError('Couldn\'t decrypt token with exchangeKey');
}

return $token;
}

Expand Down

0 comments on commit f86e75b

Please sign in to comment.