Repository navigation
feat(log): error_code - #94
Merged
Merged
Conversation
Per-provider outbound.providers.<key>.error_code (paths, prefix) stores the allowlisted machine code of a failed call (status >= 400, JSON body of at most 16 KiB) in a new nullable error_code column. Shown, filterable and exported; CallQuery::withErrorCode(). The body is never stored.
|
@coderabbitai review |
A text cell starting with =, +, -, @, TAB or CR is prefixed with an apostrophe (OWASP). Affects the released versions that export CSV.
… the code allowlist The column, index, admin fields and export column exist only while a provider sets error_code.paths (no migration otherwise); every reader and writer checks hasField. The allowlist rejects digit and hex runs, mixed-case keys, IP addresses, host-like values and known secret prefixes. Exact matching for the column, UPGRADING per-platform DDL and list-row override note.
HecFranco
marked this pull request as ready for review
November 28, 2026 07:08
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds an optional, nullable
error_codecolumn to the usage rows (outbound) holding the machine code a provider returns with a failed call, so "401" can be told apart from "wrong client secret" without storing the response body.What
outbound.providers.<key>.error_code.paths(dotted paths or JSON pointers, max 8, read in order) andprefix(integers only). Applies only to status >= 400 with a JSON body of at most 16 KiB that the application consumes; otherwiseNULL.idx_http_log_errcode_createdare mapped (likepath_prefix) only while a provider setserror_code.paths. A host that does not configure it needs no migration; every reader and writer checkshasField('errorCode').A-Za-z0-9_.:-(1..64) that does not look like an identifier or a credential (digit runs of 10+, hex runs of 16+, mixed-case alphanumeric runs of 20+, IP addresses, values with 2+ dots, UUIDs, secret prefixes such aseyJ,sk_,ghp_,xox,AKIA,AIza); anything else is stored asunknown. At most 8 values / 128 bytes. The body, descriptions and ids are never stored. Re-validated on the Messenger payload and inCallQuery.errorCode, last),CallQuery::withErrorCode()(exact match),UsageCall::$errorCode; exact-match collation on MySQL/MariaDB; translations in 7 locales.OutboundCall(closure-owned, cleared when the call is recorded).=,+,-,@, TAB or CR (pre-existing; CHANGELOG "Security").Not included
No
correlation_id/upstream_idcolumns (no decided correlation-id contract).Upgrade
Only when configuring
error_code: migration or the per-platform SQL indocs/UPGRADING.md(Unreleased), pinned byUsageSchemaTeston SQLite, MySQL and PostgreSQL. A host overridingnowo_ui_list_rowadds one cell (snippet in UPGRADING).