fix: Include backend error in OTLP conversion error message#3827
Merged
Conversation
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Signed-off-by: Yuri Shkuro <github@ysh.us>
Contributor
There was a problem hiding this comment.
Pull request overview
Updates the OTLP file-import path to surface backend transform failures in the user-visible error, improving debugging when OTLP→Jaeger conversion fails.
Changes:
- Include the backend error message when
JaegerAPI.transformOTLP()rejects during OTLP import. - Update the corresponding unit test to assert that the backend error detail is present in the thrown message.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| packages/jaeger-ui/src/utils/readJsonFile.ts | Appends the backend rejection message to the OTLP transform failure error. |
| packages/jaeger-ui/src/utils/readJsonFile.test.js | Adjusts the mock rejection and asserts the new error-message behavior. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3827 +/- ##
=======================================
Coverage 90.58% 90.58%
=======================================
Files 333 333
Lines 10483 10484 +1
Branches 2736 2737 +1
=======================================
+ Hits 9496 9497 +1
Misses 860 860
Partials 127 127 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
- Change "Error converting traces to OTLP" to "Error converting OTLP
trace to Jaeger" to accurately reflect the direction of conversion
- Pass { cause: err } to preserve the original error for debugging
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Yuri Shkuro <github@ysh.us>
Comment on lines
+58
to
+59
| const cause = err instanceof Error ? `: ${err.message}` : ''; | ||
| reject(new Error(`Error converting OTLP trace to Jaeger${cause}`, { cause: err })); |
Comment on lines
+58
to
60
| const cause = err instanceof Error ? `: ${err.message}` : ''; | ||
| reject(new Error(`Error converting OTLP trace to Jaeger${cause}`, { cause: err })); | ||
| }); |
M-DEV-1
pushed a commit
to M-DEV-1/jaeger-ui
that referenced
this pull request
May 25, 2026
…acing#3827) ## Which problem is this PR solving? - When uploading an OTLP-formatted trace file that fails the backend conversion, the error shown to the user was always the generic "Error converting traces to OTLP" with no indication of what actually went wrong. ## Description of the changes - Propagate the underlying error message from the `transformOTLP` API call into the user-facing error, so the message now reads "Error converting traces to OTLP: <backend reason>" when the backend provides one. - Updated the test mock to reject with an actual `Error` object and tightened the assertion to verify the backend cause is included in the error message. ## How was this change tested? - Existing unit tests in `readJsonFile.test.js` updated and passing. ## AI Usage in this PR (choose one) specific parts - [x] **Heavy**: AI generated most or all of the code changes --------- Signed-off-by: Yuri Shkuro <github@ysh.us> Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Harizz076
pushed a commit
to Harizz076/jaeger-ui
that referenced
this pull request
Jul 4, 2026
…acing#3827) ## Which problem is this PR solving? - When uploading an OTLP-formatted trace file that fails the backend conversion, the error shown to the user was always the generic "Error converting traces to OTLP" with no indication of what actually went wrong. ## Description of the changes - Propagate the underlying error message from the `transformOTLP` API call into the user-facing error, so the message now reads "Error converting traces to OTLP: <backend reason>" when the backend provides one. - Updated the test mock to reject with an actual `Error` object and tightened the assertion to verify the backend cause is included in the error message. ## How was this change tested? - Existing unit tests in `readJsonFile.test.js` updated and passing. ## AI Usage in this PR (choose one) specific parts - [x] **Heavy**: AI generated most or all of the code changes --------- Signed-off-by: Yuri Shkuro <github@ysh.us> Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
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.
Which problem is this PR solving?
Description of the changes
transformOTLPAPI call into the user-facing error, so the message now reads "Error converting traces to OTLP: " when the backend provides one.Errorobject and tightened the assertion to verify the backend cause is included in the error message.How was this change tested?
readJsonFile.test.jsupdated and passing.AI Usage in this PR (choose one)
specific parts