fix: opslog tweaks - #95
Conversation
maxakuru
left a comment
There was a problem hiding this comment.
Reviewed alongside the operations-log/Slack diagnostics work in helix-commerce-api#532 and vitamix#891 — this is the backend counterpart (errorInfo), used purely for AIO Runtime log.error/log.warn metadata, not sent to the operations-log endpoint. The shape and intent (stack for diagnostics, explicitly not for client-facing responses) look right, and swapping string-interpolated err.message for structured errorInfo(err) is a clear improvement — you keep the stack instead of losing it to a template string.
One gap: src/utils.js already has a dedicated test/utils.test.js covering errorResponse, but this PR doesn't add coverage for the new errorInfo export. Worth adding a few cases there (Error instance → {name, message, stack}, non-Error throwable → {message: String(error)} only, per the doc comment) so the non-Error fallback path doesn't silently regress.
No description provided.