Skip to content

Commit

Permalink
Executing a solution from a non-local IP address triggers a 403 HTTP …
Browse files Browse the repository at this point in the history
…error instead of a 500
  • Loading branch information
AlexVanderbist committed Aug 26, 2022
1 parent 6fd547c commit edc8b79
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/Exceptions/CannotExecuteSolutionForNonLocalIp.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,13 @@
use Spatie\Ignition\Contracts\BaseSolution;
use Spatie\Ignition\Contracts\ProvidesSolution;
use Spatie\Ignition\Contracts\Solution;
use Symfony\Component\HttpKernel\Exception\HttpException;

class CannotExecuteSolutionForNonLocalIp extends Exception implements ProvidesSolution
class CannotExecuteSolutionForNonLocalIp extends HttpException implements ProvidesSolution
{
public static function make(): self
{
return new self('Solutions cannot be run from your current IP address.');
return new self(403, 'Solutions cannot be run from your current IP address.');
}

public function getSolution(): Solution
Expand Down

0 comments on commit edc8b79

Please sign in to comment.