first commit
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace KupShop\GraphQLBundle\Exception;
|
||||
|
||||
class CartPreconditionFailedException extends \Exception
|
||||
{
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace KupShop\GraphQLBundle\Exception;
|
||||
|
||||
use TheCodingMachine\GraphQLite\Exceptions\GraphQLException;
|
||||
|
||||
class GraphQLDuplicatedException extends GraphQLException
|
||||
{
|
||||
public function __construct(
|
||||
string $message,
|
||||
?\Throwable $previous = null,
|
||||
array $extensions = [],
|
||||
) {
|
||||
parent::__construct($message, 409, $previous, 'DUPLICATED', $extensions);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
<?php
|
||||
|
||||
namespace KupShop\GraphQLBundle\Exception;
|
||||
|
||||
use TheCodingMachine\GraphQLite\Exceptions\GraphQLException;
|
||||
|
||||
class GraphQLNotFoundException extends GraphQLException
|
||||
{
|
||||
public function __construct(
|
||||
string $message,
|
||||
?\Throwable $previous = null,
|
||||
array $extensions = [],
|
||||
) {
|
||||
parent::__construct($message, 404, $previous, 'NOT_FOUND', $extensions);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace KupShop\GraphQLBundle\Exception;
|
||||
|
||||
use TheCodingMachine\GraphQLite\Exceptions\GraphQLException;
|
||||
|
||||
class GraphQLValidationException extends GraphQLException
|
||||
{
|
||||
public function __construct(
|
||||
string $message,
|
||||
?\Throwable $previous = null,
|
||||
array $extensions = [],
|
||||
) {
|
||||
parent::__construct($message, 400, $previous, 'VALIDATION', $extensions);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user