Skip to content

Show the cause of an exception in bref logs - #54

Merged
mnapoli merged 1 commit into
mainfrom
show-exception-cause
Sep 24, 2026
Merged

mnapoli merged 1 commit into
mainfrom
show-exception-cause

Conversation

@mnapoli

@mnapoli mnapoli commented Sep 24, 2026

Copy link
Copy Markdown
Member

Without --full, bref logs shows only the class and the location of an exception. To see the actual cause, for example the HTTP error behind a RuntimeException, the user must use --full and read the stack traces.

This change shows each previous exception on a "Caused by" line:

2026-09-23 10:12:51.863 web 45f01a ERROR Payment gateway returned 502
    ↳ RuntimeException at app/Billing.php:37 (2 frames)
    ↳ Caused by GuzzleHttp\Exception\ServerException: 502 Bad Gateway

Bref Cloud sends the previous exceptions without --full after https://github.com/brefphp/cloud/pull/386. With an earlier Bref Cloud, the output does not change.

Without --full, an exception showed only its class and location, for
example "RuntimeException at app/Billing.php:37". The actual cause, for
example the HTTP error behind it, needed --full and the stack traces.

Each previous exception now shows on a "Caused by Class: message" line.
Bref Cloud sends the previous exceptions without --full from the next
deployment. With an earlier Bref Cloud, the output does not change.
@mnapoli
mnapoli merged commit d7afed8 into main Sep 24, 2026
4 checks passed
@mnapoli
mnapoli deleted the show-exception-cause branch September 24, 2026 15:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant