feat: forward the error message to the client if an error occurs on the RDAP server side

This commit is contained in:
Maël Gangloff
2025-11-12 19:43:36 +01:00
parent aebc90d34b
commit 88a3954c6e
3 changed files with 22 additions and 2 deletions

View 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);
}
}