Skip to content

fix: opslog tweaks - #95

Merged
maxakuru merged 2 commits into
stagefrom
ops-log-tweaks
Sep 11, 2026
Merged

maxakuru merged 2 commits into
stagefrom
ops-log-tweaks

Conversation

@maxakuru

Copy link
Copy Markdown
Contributor

No description provided.

@maxakuru maxakuru left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@maxakuru
maxakuru merged commit 2c79ebd into stage Sep 11, 2026
1 check passed
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