Upgrade framework
This commit is contained in:
20
vendor/spatie/flare-client-php/src/Http/Exceptions/BadResponse.php
vendored
Normal file
20
vendor/spatie/flare-client-php/src/Http/Exceptions/BadResponse.php
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
|
||||
namespace Spatie\FlareClient\Http\Exceptions;
|
||||
|
||||
use Exception;
|
||||
use Spatie\FlareClient\Http\Response;
|
||||
|
||||
class BadResponse extends Exception
|
||||
{
|
||||
public Response $response;
|
||||
|
||||
public static function createForResponse(Response $response): self
|
||||
{
|
||||
$exception = new self("Could not perform request because: {$response->getError()}");
|
||||
|
||||
$exception->response = $response;
|
||||
|
||||
return $exception;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user