Repository navigation
fix(sdk): preserve type-only callback failure messages - #851
Merged
zhongkechen merged 4 commits intoOct 30, 2026
Merged
Conversation
Return the supplied error type when the callback error message is absent or empty. Preserve the original ErrorObject and cover telemetry plus durable replay. AI assistance: Codex generated the fix/tests and ran local verification.
YingzuoLiu
temporarily deployed
to
ai-pr-review-runtime
October 30, 2026 05:35 — with
GitHub Actions
Inactive
Contributor
Codex AI reviewOne approach finding at Reviewed commit |
zhongkechen
approved these changes
Oct 30, 2026
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.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
Issue Link, if available
Fixes #849.
Description
A callback failed with only ErrorType="RejectedError" produces "RejectedError: null", which also reaches the telemetry exporter's fallback message. Return the supplied type alone when the message is absent or empty. An ErrorObject whose type and message are both absent or empty now displays "Callback failed". Preserve the original ErrorObject fields, exception class, callback identity, and replay behavior.
Design
Assumptions
Decisions not covered by the issue or the design note
Checklist
Testing
Unit Tests
On pristine main at 64339d4, the original CallbackExceptionTest regression set ran 11 cases with two failures: expected "RejectedError", got "RejectedError: null" or "RejectedError: ". Those cases pass with the fix.
The additional empty-ErrorObject fallback was separately checked against b17f2c4: the latest 13-case class had four assertion failures (expected "Callback failed", received null or empty). At latest head 6dcc03e, all 13 cases pass. Controls assert unchanged underlying error fields.
Integration Tests
Both new CallbackFailureMessageTest cases fail without the original fix and pass with it. They exercise an uncaught callback failure through the SDK and telemetry exporter, plus a caught failure followed by a durable wait and resume. They verify exported/root messages (including the name-keyed record shape), unchanged callback error and ID, and that a completed step executes only once.
Latest-head validation (6dcc03e):
Validation used Java 17 and Maven 3.9.11. This container cannot dynamically attach Mockito, so test runs supplied the existing Mockito 5.24.0 JAR at JVM startup via JAVA_TOOL_OPTIONS=-javaagent:/path/to/mockito-core-5.24.0.jar; no POM/dependency changes were made. The complete unrelated module/cloud/conformance suites were not run. Local validation does not replace maintainer review or approval of fork workflows.
Examples
Not applicable; no public usage change.
AI assistance
Codex generated the original and follow-up code/tests, inspected the relevant implementation and contribution rules, and executed the before/after and full related-module checks. This is AI-assisted work, not a claim of manual authorship.