api(application): v2 backport
This commit is contained in:
parent
4cd0bee231
commit
67bf3e342e
172 changed files with 2922 additions and 1579 deletions
|
@ -233,7 +233,7 @@ final class Handler extends ExceptionHandler
|
|||
/**
|
||||
* Return an array of exceptions that should not be reported.
|
||||
*/
|
||||
public static function isReportable(\Exception $exception): bool
|
||||
public static function isReportable(Exception $exception): bool
|
||||
{
|
||||
return (new static(Container::getInstance()))->shouldReport($exception);
|
||||
}
|
||||
|
|
21
app/Exceptions/Http/QueryValueOutOfRangeHttpException.php
Normal file
21
app/Exceptions/Http/QueryValueOutOfRangeHttpException.php
Normal file
|
@ -0,0 +1,21 @@
|
|||
<?php
|
||||
|
||||
namespace Pterodactyl\Exceptions\Http;
|
||||
|
||||
use Illuminate\Http\Response;
|
||||
use Symfony\Component\HttpKernel\Exception\HttpException;
|
||||
|
||||
class QueryValueOutOfRangeHttpException extends HttpException
|
||||
{
|
||||
/**
|
||||
* QueryValueOutOfRangeHttpException constructor.
|
||||
*/
|
||||
public function __construct(string $name, int $min, int $max, \Throwable $previous = null)
|
||||
{
|
||||
parent::__construct(
|
||||
Response::HTTP_BAD_REQUEST,
|
||||
'\"' . $name . '\" query parameter must be between ' . $min . ' and ' . $max,
|
||||
$previous,
|
||||
);
|
||||
}
|
||||
}
|
|
@ -1,14 +0,0 @@
|
|||
<?php
|
||||
|
||||
namespace Pterodactyl\Exceptions;
|
||||
|
||||
use Spatie\Ignition\Contracts\Solution;
|
||||
use Spatie\Ignition\Contracts\ProvidesSolution;
|
||||
|
||||
class ManifestDoesNotExistException extends \Exception implements ProvidesSolution
|
||||
{
|
||||
public function getSolution(): Solution
|
||||
{
|
||||
return new Solutions\ManifestDoesNotExistSolution();
|
||||
}
|
||||
}
|
9
app/Exceptions/Service/Egg/BadYamlFormatException.php
Normal file
9
app/Exceptions/Service/Egg/BadYamlFormatException.php
Normal file
|
@ -0,0 +1,9 @@
|
|||
<?php
|
||||
|
||||
namespace Pterodactyl\Exceptions\Service\Egg;
|
||||
|
||||
use Pterodactyl\Exceptions\DisplayException;
|
||||
|
||||
class BadYamlFormatException extends DisplayException
|
||||
{
|
||||
}
|
|
@ -1,25 +0,0 @@
|
|||
<?php
|
||||
|
||||
namespace Pterodactyl\Exceptions\Solutions;
|
||||
|
||||
use Spatie\Ignition\Contracts\Solution;
|
||||
|
||||
class ManifestDoesNotExistSolution implements Solution
|
||||
{
|
||||
public function getSolutionTitle(): string
|
||||
{
|
||||
return "The manifest.json file hasn't been generated yet";
|
||||
}
|
||||
|
||||
public function getSolutionDescription(): string
|
||||
{
|
||||
return 'Run yarn run build:production to build the frontend first.';
|
||||
}
|
||||
|
||||
public function getDocumentationLinks(): array
|
||||
{
|
||||
return [
|
||||
'Docs' => 'https://github.com/pterodactyl/panel/blob/develop/package.json',
|
||||
];
|
||||
}
|
||||
}
|
|
@ -1,9 +0,0 @@
|
|||
<?php
|
||||
|
||||
namespace Pterodactyl\Exceptions\Transformer;
|
||||
|
||||
use Pterodactyl\Exceptions\PterodactylException;
|
||||
|
||||
class InvalidTransformerLevelException extends PterodactylException
|
||||
{
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue