In error.vm we wanted to set the HTTP status to 500 for exception messages, like it is set for the flowRequestContext to 403 or 400. However, $response.setStatus(500) is not available when $exception is true and the HTTP code reported is 200.
Environment
None
Activity
Scott Cantor
June 8, 2020 at 11:09 PM
Merged to master, default view updated.
Scott Cantor
June 4, 2020 at 3:25 PM
Fix pushed to dev/JSE-36.
Overrode method that returns the ModelAndView, to inject HttpServletResponse into response variable. Tested that overriding the default status in the view template appears to work. Once this is resolved I'll update the default view to do this by default.
Scott Cantor
June 3, 2020 at 2:16 PM
I moved it over to an RFE and scheduled it for 4.1
Thomas Lenggenhager
June 3, 2020 at 2:04 PM
Thanks for the analysis. It is not urgent, if it is not just configurable, we can live with status code 200. However, it would be nice to see the status 500 in a future version.
Scott Cantor
June 3, 2020 at 1:51 PM
It's either impossible without code changes, or there may be a way to leverage an extension point that's not discussed anywhere to tunnel in the response in the meantime. I'll have to do some testing to determine which. It's basically a new feature to support it, if it's possible.
In error.vm we wanted to set the HTTP status to 500 for exception messages, like it is set for the flowRequestContext to 403 or 400.
However, $response.setStatus(500) is not available when $exception is true and the HTTP code reported is 200.