Exception logging writes to the database, so DB outages are recorded nowhere #166
Labels
No labels
bug
devops
duplicate
enhancement
good first issue
layout
next major release
next minor release
question
research
testing
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: lvl0/fedi-feed-router#166
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
LogExceptionToDatabase::handle()persists every exception viaLog::create(). When the database is the thing that failed, the insert fails identically and the exception is lost.During #164 the only surviving output was the wrapper from
app/Listeners/LogExceptionToDatabase.php:35:The message names the failed insert, not the original error. The real cause — a
QueryExceptionfromSessionGuard::userFromRecaller()during auth — was only recoverable because the nested exception text happened to embed it. Diagnosis depended on that accident.The existing comment at line 34 already flags the gap:
Fix
In the catch block, write the original exception through Laravel's file/stderr logger (
Log::channel(...)) rather than onlyerror_log()with the wrapper message. Preserve exception class, file, line and trace.Tests
Log::create()throws, the original exception's details reach the fallback channelSuperseded by #164, which now covers the exception-logging fallback along with the healthcheck fix and the startup/Horizon supervision defects from the same incident. Consolidating to keep the work in one ticket.