Redact internal details from analytics engine 500 error responses#22233
Redact internal details from analytics engine 500 error responses#22233finnegancarroll wants to merge 1 commit into
Conversation
PR Reviewer Guide 🔍(Review updated until commit b1fb99d)Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Latest suggestions up to b1fb99d Explore these optional code suggestions:
Previous suggestionsSuggestions up to commit b28f4e3
Suggestions up to commit b28f4e3
Suggestions up to commit b28f4e3
Suggestions up to commit 9b841fb
Suggestions up to commit 57bde0f
|
94fd5c6 to
fd80fc2
Compare
|
Persistent review updated to latest commit fd80fc2 |
fd80fc2 to
57bde0f
Compare
|
Persistent review updated to latest commit 57bde0f |
|
❌ Gradle check result for 57bde0f: FAILURE Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change? |
1f0bfc0 to
9b841fb
Compare
|
Persistent review updated to latest commit 9b841fb |
1 similar comment
|
Persistent review updated to latest commit 9b841fb |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #22233 +/- ##
============================================
+ Coverage 73.38% 73.75% +0.36%
- Complexity 75904 76271 +367
============================================
Files 6069 6069
Lines 344869 344869
Branches 49623 49623
============================================
+ Hits 253081 254353 +1272
+ Misses 71570 70567 -1003
+ Partials 20218 19949 -269 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
9b841fb to
b28f4e3
Compare
|
Persistent review updated to latest commit b28f4e3 |
|
Persistent review updated to latest commit b28f4e3 |
|
Persistent review updated to latest commit b28f4e3 |
Unrecognized exceptions (those not converted by NativeErrorConverter to 400/429) now return a generic 'Internal error [task_id=X, query_id=Y]' message to the user instead of leaking internal details (stage IDs, shard routing, gRPC metadata, native error messages, planner internals). The full stack trace is logged at ERROR level server-side so operators can still diagnose issues using the task/query ID as a correlator. Exceptions with well-defined HTTP semantics (IllegalArgumentException -> 400, CircuitBreakingException -> 429, RejectedExecution -> 429) are passed through unchanged since their messages are user-facing by design. Signed-off-by: Finn Carroll <carrofin@amazon.com>
b28f4e3 to
b1fb99d
Compare
|
Persistent review updated to latest commit b1fb99d |
|
❌ Gradle check result for b1fb99d: FAILURE Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change? |
Description
Unrecognized exceptions from the analytics engine (those not converted by
NativeErrorConverterto 400/429) currently leak internal details in the error response: cause and wrapped exception types.Change
At the top-level
convertingListenerinDefaultPlanExecutor.doExecute():Internal error [task_id=X, query_id=Y]User sees (after)
{ "error": { "type": "runtime_exception", "reason": "Internal error [task_id=12345, query_id=8ffee8b8-944b-4fcd-9f71-6f4601f8034b]" }, "status": 500 }Operators grep server logs for the task/query ID to find the full stack trace.