JFIF x x C C " } !1AQa "q2#BR$3br %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz w !1AQ aq"2B #3Rbr{
File "BadResponseCode.php"
Full Path: /var/www/laravel_filter/vendor/spatie/flare-client-php/src/Http/Exceptions/BadResponseCode.php
File size: 798 bytes
MIME-type: text/x-php
Charset: utf-8
<?php
namespace Spatie\FlareClient\Http\Exceptions;
use Exception;
use Spatie\FlareClient\Http\Response;
class BadResponseCode extends Exception
{
public Response $response;
/**
* @var array<int, mixed>
*/
public array $errors = [];
public static function createForResponse(Response $response): self
{
$exception = new self(static::getMessageForResponse($response));
$exception->response = $response;
$bodyErrors = isset($response->getBody()['errors']) ? $response->getBody()['errors'] : [];
$exception->errors = $bodyErrors;
return $exception;
}
public static function getMessageForResponse(Response $response): string
{
return "Response code {$response->getHttpResponseCode()} returned";
}
}