-
Notifications
You must be signed in to change notification settings - Fork 25.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Check that scripts produce correct json in render template action (#1…
…01518) If a mustache script that outputs badly-formed json is referred to in a render template request, then the error returned will be a 500 server error, rather than a 400 json parsing error. This is because rendering templates skips json parsing, and so the error ends up being caught in the REST layer instead. This commit changes the template rendering logic to always parse the output of the script, catching json errors higher in the stack and allowing us to return the correct status code. This also means that errors are correctly detected and returned as part of multi search template requests. Fixes #101477
- Loading branch information
1 parent
a591804
commit f7a9783
Showing
5 changed files
with
89 additions
and
16 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
pr: 101518 | ||
summary: Check that scripts produce correct json in render template action | ||
area: Search | ||
type: bug | ||
issues: | ||
- 101477 |
This file contains 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
This file contains 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
This file contains 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
This file contains 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