fix: report the correct error message on trigger node.sql failure#10197
Merged
asheshv merged 1 commit intoJul 24, 2026
Conversation
The failure path for the second query (node.sql, resolving the trigger function's node data) reported errormsg=rset — the result dict from the first, already-successful get_function_oid.sql query — instead of res, the actual error from the failed query. Any failure here (permissions, catalog access) surfaced a stale, misleading payload instead of the real cause.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
WalkthroughCorrects ChangesTrigger query handling
Estimated code review effort: 1 (Trivial) | ~2 minutes Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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.
Summary
Follow-up to #10177 (merged) — review of that PR flagged an adjacent, pre-existing bug in the same function it touched.
Bug
In
TriggerFunctionView(or equivalent trigger-function-info flow), after resolving the trigger function'snode.sqldata:rsetis the result dict from the earlier, already-successfulget_function_oid.sqlquery — not the error from the query that actually failed. Any failure on this second query (permissions, catalog access error) surfaces a stale/misleading payload instead of the real cause, making it undiagnosable.Fix
errormsg=res— the actual error string from the failed query, consistent with every other error-handling call site in this file (errormsg=respattern used ~10 other times).Testing
ast.parseclean,pycodestyleclean. No behavior change on the success path; only the error message on this one failure path changes.Summary by CodeRabbit