Skip to content

Inconsistent RequestException message with and without trucateAt #61216

Description

@alecpl

Laravel Version

12.66.0

PHP Version

8.2

Database Driver & Version

No response

Description

When using Illuminate\Http\Client\RequestException::dontTruncate() the exception message is:

HTTP request returned status code 405:
HTTP/1.1 405 Method Not Allowed
Server: nginx/1.20.1
Date: Wed, 12 Aug 2026 16:21:44 GMT
Content-Type: text/html; charset=utf-8
Content-Length: 906242

<!DOCTYPE html>
<html lang="en">
<head>
...

but when using Illuminate\Http\Client\RequestException::truncateAt(2048) the message does not include headers:

HTTP request returned status code 405:
<!DOCTYPE html>
<html lang="en">
<head>
...

I'd like to see headers in both cases.

Steps To Reproduce

n/a

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions