Skip to content

Thymeleaf error is logged but no response is returned. #832

@moleza

Description

@moleza

Expected Behavior

Error response should be returned so error can be handled.

There is two examples included the first is / that the <script> tag is missing from the template which shows the error in the console but the request doesn't complete and no exception is caught.

The second example /test uses ModelAndView to create a fragment and there is a spelling mistake on the record attribute which again shows the console error but is not caught by the local try catch or the global exceptions.

Actual Behaviour

Request seems to hang and doesn't return anything. Exceptions should be available so errors can fail gracefully and not just hang.

Steps To Reproduce

Run locally and visit http://localhost:8080/ and the <script> tag is missing from the template.

Visit http://localhost:8080/test which uses ModelAndView with a spelling mistake for the record attribute.

Environment Information

Ubuntu : 22.04
Java : Temurin 21.0.3

Example Application

https://github.com/moleza/micronaut-view-thymeleaf

Version

4.5.0

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions