Skip to content

Commit

Permalink
small fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Iulian Masar committed Apr 2, 2024
1 parent 8caebf2 commit 802aae7
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
9 changes: 9 additions & 0 deletions MangoPay/Libraries/ResponseException.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,4 +76,13 @@ public function GetErrorDetails()
{
return $this->_errorInfo;
}

/**
* Get Error code returned by REST API
* @return int
*/
public function GetErrorCode()
{
return $this->_code;
}
}
2 changes: 1 addition & 1 deletion tests/Cases/UboDeclarationsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ public function test_throw_CreateUbo()
try {
$this->_api->UboDeclarations->CreateUbo($matrix->Id, null, $ubo);
} catch (ResponseException $e) {
log($e->_code);
log($e->GetErrorCode());
}
}

Expand Down

0 comments on commit 802aae7

Please sign in to comment.