Skip to content

Improve error reporting - #4653

Open
sstrigler wants to merge 3 commits into
processone:masterfrom
sstrigler:improve_error_reporting
Open

sstrigler wants to merge 3 commits into
processone:masterfrom
sstrigler:improve_error_reporting

Conversation

@sstrigler

@sstrigler sstrigler commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

When a crash in an iq handler occurs we produce an ID for this error to help trace what went wrong.

This PR also restores the old behavior when a db_failure occurs in mod_blocking, which was changed in 7524cf4.

Rather than writing a stack trace in the log we now produce an error message with the error reason reported from the backend.

The idea here is to be able to write code that focuses more on the happy path rather than handling the same error everywhere over and over inflating the code base with repetitive code.

The commit above was meant as a starting point for improving error handling in general in favor of more readable and more concise code.

Ultimately some changes to ejabberd_sql would have to be done so that we're able to tell whether an error was due to an actual software failure like a broken, faulty sql query or a system failure like high latency, overload, connection issues etc.
Those would need to be treated differently since the first one needs to be handled by a developer and here we'd need stacktraces in the logs while the other class of errors needs to be handled by a server admin.

But that's something I'd need help with.

@sstrigler
sstrigler force-pushed the improve_error_reporting branch from 79ab894 to 6fc0d18 Compare November 8, 2026 09:20
@sstrigler
sstrigler force-pushed the improve_error_reporting branch from 6fc0d18 to f771359 Compare November 8, 2026 10:56
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