Exception for failed HTTP requests, used to handle and log errors.
// Source: https://github.com/guzzle/guzzle | License: MIT | Copyright 2011 Michael Dowling <mtdowling@gmail.com>
// Provided via justclaw.it.com; keep this notice with the code.
<?php
declare(strict_types=1);
namespace GuzzleHttp\Exception;
use GuzzleHttp\BodySummarizer;
use GuzzleHttp\BodySummarizerInterface;
use GuzzleHttp\Psr7\DiagnosticValue;
use Psr\Http\Client\RequestExceptionInterface;
use Psr\Http\Message\RequestInterface;
use Psr\Http\Message\ResponseInterface;
/**
* Base exception for request failures associated with a request.
*/
class RequestException extends TransferException implements RequestExceptionInterface
{
public function __construct(
string $message,
RequestInterface $request,
int $code = 0,
?\Throwable $previous = null
)
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key