Repository navigation
fix: raise ParseException on malformed curly brace expression (#2377) - #2390
Conversation
Validate that curly brace wrapping has matching closing brace and non-empty content, raising ParseException instead of StringIndexOutOfBoundsException. Also record evaluation errors in live trace spans and guard webhook task. Signed-off-by: Arya Rathore <[email protected]>
…n ExpressionParser Verify ParseException is raised when encountering unmatched closing braces or empty expressions within curly brace delimiters. Signed-off-by: Arya Rathore <[email protected]>
|
Welcome to the Microcks community! 💖 Thanks and congrats 🎉 for opening your first pull request here! Be sure to follow the pull request template or please update it accordingly. Hope you have a great time there! |
lbroudoux
left a comment
There was a problem hiding this comment.
It lloks great! Thnak you 🙏
|
You are now a Microcks community contributor! 💖 Thanks and congrats 🚀 on merging your first pull request! We are delighted and very proud of you! 👏 📢 If you're using Microcks in your organization, please add your company name to this list. 🙏 It really helps the project to gain momentum and credibility. It's a small contribution back to the project with a big impact. If you need to know why and how to add yourself to the list, please read the blog post "Join the Microcks Adopters list and Empower the vibrant open source Community 🙌" Kudos and please keep going, we need you 🙌 |
|
Thanks @lbroudoux ! Glad to contribute. |
Description
{...}) have matching braces and non-empty inner content before substring slicing. Malformed expressions (e.g.,{{{}},{{{foo}},{{{}}}) now raise a standardParseExceptionwith a character offset instead of an unhandledStringIndexOutOfBoundsException.MockControllerCommons.unguardedRenderResponseContent(), log the failure message and record the exception along with atemplate_evaluation_failedspan event onSpan.current()for visibility in OpenTelemetry Live Traces.ExpressionParserTestcovering unmatched closing braces, unclosed expressions, and empty or whitespace-only brace-wrapped expressions.Related issue(s)
Fixes #2377
Test Results