mirror of
https://github.com/maelgangloff/domain-watchdog.git
synced 2025-12-29 16:15:04 +00:00
feat: forward the error message to the client if an error occurs on the RDAP server side
This commit is contained in:
13
src/Exception/RdapServerException.php
Normal file
13
src/Exception/RdapServerException.php
Normal file
@@ -0,0 +1,13 @@
|
||||
<?php
|
||||
|
||||
namespace App\Exception;
|
||||
|
||||
use Symfony\Component\HttpClient\Exception\ServerException;
|
||||
|
||||
class RdapServerException extends \Exception
|
||||
{
|
||||
public static function fromServerException(ServerException $e): self
|
||||
{
|
||||
return new self($e->getMessage(), $e->getCode(), $e);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user