Skip to content

fix(ateapi): hide unexpected backend errors from RPC responses - #2295

Open
aiqubits wants to merge 1 commit into
agent-substrate:mainfrom
aiqubits:fix/ateapi-internal-error-disclosure
Open

aiqubits wants to merge 1 commit into
agent-substrate:mainfrom
aiqubits:fix/ateapi-internal-error-disclosure

Conversation

@aiqubits

@aiqubits aiqubits commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

Title: fix(ateapi): hide unexpected backend errors from RPC clients

Fixes #2277.

Unexpected ateapi handler errors currently expose backend diagnostics to external RPC callers. Return an opaque Internal message with the active trace ID when available, while retaining the original error in the existing server log for diagnosis.

Explicit apierror and context error mappings retain their existing codes and messages. The change is limited to the public unary interceptor and its regression tests.

Validation:

  • Regression tests fail before the fix and pass afterward. Race tests pass across seven related packages, including the ateapi services and CLI.

  • Additional review-only gRPC transport checks pass for status details, sampled and unsampled tracing, invalid span contexts, cancellation, deadlines, and response trailers.

  • Code generation, module, formatting, repository-wide lint, Kubernetes API, boilerplate, and license checks pass.

  • Tests pass (targeted tests pass; full-suite baseline failures are listed above)

  • Appropriate changes to documentation are included in the PR (interceptor contract comment updated)

@maxsmythe Max Smythe (maxsmythe) added kind/cleanup Small fixes that are not bugs, for example a typo in a code comment area/api-machinery kind/bug Something isn't working / bugfixes area/security Security related issue/pr and removed kind/cleanup Small fixes that are not bugs, for example a typo in a code comment labels Oct 8, 2026

@maxsmythe Max Smythe (maxsmythe) left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM

auto-merge was automatically disabled October 25, 2026 10:45

Head branch was pushed to by a user without write access

@aiqubits
aiqubits force-pushed the fix/ateapi-internal-error-disclosure branch from b99b339 to 0cd7d28 Compare October 25, 2026 10:45
@aiqubits

Copy link
Copy Markdown
Contributor Author

Max Smythe (@maxsmythe) I only updated the branches and tests to ensure that CI passed, and there were no changes to other fixes. Please review again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/api-machinery area/security Security related issue/pr kind/bug Something isn't working / bugfixes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Unwrapped backend database errors leaked to external gRPC callers

2 participants