mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-07-01 12:02:05 +00:00
fix(gateway): log error-notification failures instead of silently swallowing (#54472)
* fix(gateway): log error-notification failures instead of silently swallowing The last-resort exception handler in _process_message_background() that sends an error notice to the user caught all exceptions with a bare pass, leaving zero trace when the notification itself failed. Upgrade to logger.error(..., exc_info=True) so a failed error-notification send is debuggable post-mortem. Salvaged from #6499 by @BongSuCHOI (the logging-upgrade portion only). * docs: add PR infographic for gateway error-notify logging
This commit is contained in:
parent
3483424aaa
commit
f1cbe4308f
2 changed files with 5 additions and 2 deletions
|
|
@ -4955,8 +4955,11 @@ class BasePlatformAdapter(ABC):
|
|||
),
|
||||
metadata=_thread_metadata,
|
||||
)
|
||||
except Exception:
|
||||
pass # Last resort — don't let error reporting crash the handler
|
||||
except Exception as notify_err:
|
||||
logger.error(
|
||||
"[%s] Failed to send error notification to user: %s",
|
||||
self.name, notify_err, exc_info=True,
|
||||
) # Last resort — don't let error reporting crash the handler
|
||||
finally:
|
||||
# Stop typing before any deferred callback work. Post-delivery
|
||||
# callbacks may perform platform I/O; a stuck callback must not
|
||||
|
|
|
|||
BIN
infographic/gateway-error-notify-logging/infographic.png
Normal file
BIN
infographic/gateway-error-notify-logging/infographic.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.3 MiB |
Loading…
Add table
Add a link
Reference in a new issue