Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
rlzdesenv authored Aug 19, 2021
1 parent 7a70ea4 commit 4821529
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Bank/BrasilArrecadacaoService.php
Original file line number Diff line number Diff line change
Expand Up @@ -221,8 +221,8 @@ public function createPix()
} catch (RequestException $e) {
if($e->hasResponse()) {
$error = json_decode($e->getResponse()->getBody()->getContents());
$exception = new InvalidArgumentException($error->codigo, $error->mensagem);
throw new \Exception($error->mensagem, 406, $exception);
$exception = new InvalidArgumentException($error->erros[0]->codigo, $error->erros[0]->mensagem);
throw new \Exception($error->erros[0]->mensagem, 406, $exception);
} else {
throw new \Exception($e->getMessage(), $e->getCode());
}
Expand Down

0 comments on commit 4821529

Please sign in to comment.