mirror of
https://github.com/shlinkio/shlink.git
synced 2025-02-25 18:45:27 -06:00
Updated ValidationException's base exception
This commit is contained in:
parent
a28ef1f176
commit
13e795d25d
@ -17,7 +17,7 @@ use function sprintf;
|
|||||||
|
|
||||||
use const PHP_EOL;
|
use const PHP_EOL;
|
||||||
|
|
||||||
class ValidationException extends RuntimeException implements ProblemDetailsExceptionInterface
|
class ValidationException extends InvalidArgumentException implements ProblemDetailsExceptionInterface
|
||||||
{
|
{
|
||||||
use CommonProblemDetailsExceptionTrait;
|
use CommonProblemDetailsExceptionTrait;
|
||||||
|
|
||||||
|
@ -130,6 +130,7 @@ class UrlShortener implements UrlShortenerInterface
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @throws ShortUrlNotFoundException
|
* @throws ShortUrlNotFoundException
|
||||||
|
* @fixme Move this method to a different service
|
||||||
*/
|
*/
|
||||||
public function shortCodeToUrl(string $shortCode, ?string $domain = null): ShortUrl
|
public function shortCodeToUrl(string $shortCode, ?string $domain = null): ShortUrl
|
||||||
{
|
{
|
||||||
|
@ -16,6 +16,7 @@ use function explode;
|
|||||||
use function sprintf;
|
use function sprintf;
|
||||||
use function strtolower;
|
use function strtolower;
|
||||||
|
|
||||||
|
/** @deprecated */
|
||||||
class AuthorizationHeaderPlugin implements AuthenticationPluginInterface
|
class AuthorizationHeaderPlugin implements AuthenticationPluginInterface
|
||||||
{
|
{
|
||||||
public const HEADER_NAME = 'Authorization';
|
public const HEADER_NAME = 'Authorization';
|
||||||
|
@ -22,14 +22,14 @@ class RestUtils
|
|||||||
/** @deprecated */
|
/** @deprecated */
|
||||||
public const INVALID_SLUG_ERROR = Core\NonUniqueSlugException::TYPE;
|
public const INVALID_SLUG_ERROR = Core\NonUniqueSlugException::TYPE;
|
||||||
/** @deprecated */
|
/** @deprecated */
|
||||||
|
public const NOT_FOUND_ERROR = Core\TagNotFoundException::TYPE;
|
||||||
|
/** @deprecated */
|
||||||
|
public const UNKNOWN_ERROR = 'UNKNOWN_ERROR';
|
||||||
|
|
||||||
public const INVALID_CREDENTIALS_ERROR = 'INVALID_CREDENTIALS';
|
public const INVALID_CREDENTIALS_ERROR = 'INVALID_CREDENTIALS';
|
||||||
public const INVALID_AUTH_TOKEN_ERROR = 'INVALID_AUTH_TOKEN';
|
public const INVALID_AUTH_TOKEN_ERROR = 'INVALID_AUTH_TOKEN';
|
||||||
public const INVALID_AUTHORIZATION_ERROR = 'INVALID_AUTHORIZATION';
|
public const INVALID_AUTHORIZATION_ERROR = 'INVALID_AUTHORIZATION';
|
||||||
public const INVALID_API_KEY_ERROR = 'INVALID_API_KEY';
|
public const INVALID_API_KEY_ERROR = 'INVALID_API_KEY';
|
||||||
/** @deprecated */
|
|
||||||
public const NOT_FOUND_ERROR = Core\TagNotFoundException::TYPE;
|
|
||||||
/** @deprecated */
|
|
||||||
public const UNKNOWN_ERROR = 'UNKNOWN_ERROR';
|
|
||||||
|
|
||||||
/** @deprecated */
|
/** @deprecated */
|
||||||
public static function getRestErrorCodeFromException(Throwable $e): string
|
public static function getRestErrorCodeFromException(Throwable $e): string
|
||||||
|
Loading…
Reference in New Issue
Block a user