mirror of
https://github.com/cypht-org/cypht.git
synced 2026-04-25 13:05:53 +03:00
[PR #1470] [MERGED] fix(backend): improve error handling in message-list.php sub-process #1537
Labels
No labels
2fa
I18N
PGP
Security
Security
account
advanced_search
advanced_search
announcement
api_login
authentication
awaiting feedback
blocker
bug
bug
bug
calendar
config
contacts
core
core
devops
docker
docs
duplicate
dynamic_login
enhancement
epic
feature
feeds
framework
github
github
gmail_contacts
good first issue
help wanted
history
history
imap
imap_folders
inline_message
installation
keyboard_shortcuts
keyboard_shortcuts
ldap_contacts
mobile
need-ssh-access
new module set
nux
pop3
profiles
pull-request
question
refactor
release
research
saved_searches
smtp
strategic
tags
tests
themes
website
wordpress
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/cypht#1537
Loading…
Add table
Add a link
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?
📋 Pull Request Information
Original PR: https://github.com/cypht-org/cypht/pull/1470
Author: @indridieinarsson
Created: 3/11/2025
Status: ✅ Merged
Merged: 3/25/2025
Merged by: @kroky
Base:
master← Head:pr_worker_errorhandling📝 Commits (1)
a90153bImprove error handling is sub-processes📊 Changes
1 file changed (+8 additions, -2 deletions)
View changed files
📝
modules/imap/functions.php(+8 -2)📄 Description
🍰 Pullrequest
PR #1452 introduced a separate process for concurrently loading messages. In my use case, where cypht runs standalone in a docker container (compiled using the official cypht Dockerfile), most error messages and exceptions leave no traces in the logs, even if using the development versions of php.ini (also supplied by the base docker image). This makes it very hard to debug if things go wrong in message_list.php
This PR tries to remedy this by wrapping the entire contents of message_list.php in a try/catch clause, and then piping the resulting error messages to the parent process via stderr. This way, errors in the subprocess leave understandable log entries.
According to my (admittedly quite limited) research, there are negligible performance implications of wrapping the code in a try block, as long as no exceptions are thrown (performance hit of try/catch is supposed to be only due to the cost of handling the exception).
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.