[Enhancement] Expose auth/connectivity error details from connector metadata operations to end users#75490
[Enhancement] Expose auth/connectivity error details from connector metadata operations to end users#75490dirtysalt wants to merge 16 commits into
Conversation
|
@codex review |
|
Codex Review: Didn't find any major issues. You're on a roll. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f5e3d3cf92
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Signed-off-by: yanz <dirtysalt1987@gmail.com> Signed-off-by: tqqq <dirtysalt1987@gmail.com>
Signed-off-by: tqqq <dirtysalt1987@gmail.com>
Signed-off-by: tqqq <dirtysalt1987@gmail.com>
Signed-off-by: tqqq <dirtysalt1987@gmail.com>
Signed-off-by: tqqq <dirtysalt1987@gmail.com>
Signed-off-by: tqqq <dirtysalt1987@gmail.com>
Signed-off-by: tqqq <dirtysalt1987@gmail.com>
Signed-off-by: tqqq <dirtysalt1987@gmail.com>
4d5e063 to
743a4bb
Compare
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 743a4bba1f
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Pull request was converted to draft
Signed-off-by: tqqq <dirtysalt1987@gmail.com>
Signed-off-by: tqqq <dirtysalt1987@gmail.com>
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5dcd2fe2fa
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Signed-off-by: tqqq <dirtysalt1987@gmail.com>
Signed-off-by: tqqq <dirtysalt1987@gmail.com>
|
I guess probabbly no one is interested in that since this enhancement needs broad and long time discussion |
Signed-off-by: tqqq <dirtysalt1987@gmail.com>
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9c62e17917
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Signed-off-by: tqqq <dirtysalt1987@gmail.com>
Signed-off-by: tqqq <dirtysalt1987@gmail.com>
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 49fcd485e0
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Signed-off-by: tqqq <dirtysalt1987@gmail.com>
[Java-Extensions Incremental Coverage Report]✅ pass : 0 / 0 (0%) |
[FE Incremental Coverage Report]✅ pass : 81 / 90 (90.00%) file detail
|
|
|
@codex review |
[BE Incremental Coverage Report]✅ pass : 0 / 0 (0%) |
|
Codex Review: Didn't find any major issues. Chef's kiss. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |



Why I'm doing:
When external catalogs (HMS, Glue, Iceberg REST/Glue, Delta Lake, Hudi, Paimon) hit an auth or connectivity failure, the error shown to users was often incomplete — a single-level message like "The security token is invalid" with no indication of which layer threw it, since each connector handled exceptions inconsistently and the display site only ever called
e.getMessage(), which surfaces just the outermost message.What I'm doing:
Lower layers stop flattening or re-interpreting the exception chain — they only add a brief context label. The top-level display site unwinds the full chain once and presents it to the user.
LogUtil.getUnwoundExceptionMessage(Throwable)— walks the cause chain up to 20 levels, transparently unwrapsInvocationTargetException(common from HMS reflection calls), and formats the result.StmtExecutor— both display paths (catch StarRocksExceptionfor DDL andcatch Throwablefor queries/SHOW) now callgetUnwoundExceptionMessage, so the full chain reaches the user regardless of which connector or operation triggered the error.new StarRocksConnectorException(context, cause)acrossHiveMetaClient.callRPC(),IcebergRESTCatalog,IcebergGlueCatalog,CachingIcebergCatalog,IcebergMetadata,DeltaLakeMetastore/DeltaLakeMetadata,HudiMetadata,PaimonMetadata.StarRocksConnectorException— removed the deadfromExternalException-era overrides.Scoping fix (added after initial review):
StmtExecutor's two catch blocks are the shared error-reporting path for every SQL statement, not just connector operations, so a naive "always unwind" implementation leaked class-name prefixes into unrelated errors (e.g. a plainDdlException: Unknown thread id: ...) that never had them before.getUnwoundExceptionMessagenow only produces the multi-layer format when there's a genuine, distinct cause chain to unwind:e.getMessage()— no class name.SemanticException→AnalysisException) are collapsed into one so the same text isn't shown twice.This keeps the original connector-error goal intact while leaving every unrelated error message byte-for-byte unchanged.
What type of PR is this:
Does this PR entail a change in behavior?
If yes, please specify the type of change:
Checklist:
Bugfix cherry-pick branch check: