Skip to content

Commit

Permalink
Merge pull request #20 from mon-petit-placement/425-handle-errors-whe…
Browse files Browse the repository at this point in the history
…n-sending

feat: handle errors while sending informations to universign
  • Loading branch information
oliviermpp authored Oct 16, 2023
2 parents 28a90ab + 0c06849 commit 6625086
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Requester/XmlRpcRequester.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,10 @@ protected function send(string $method, $params): mixed
{
$response = $this->xmlRpcClient->send($this::buildRequest($method, $this->flatten($params)));

if (!empty($response->faultString())) {
throw new \UnexpectedValueException('Error while sending informations to universign : ' . $response->faultString());
}

return $response->value();
}

Expand Down

0 comments on commit 6625086

Please sign in to comment.