I have a status request in my api for monitoring on
/status
, this request can return 500 with a body that gives details. I also have a StatusPages that listens to all generic 500 errors with respondText.
The problem is that the StatusPages overrides the response body on my
/status
request. Is there a way to check if there already is a response body in my StatusPages or something?
a
Aleksei Tirman [JB]
01/30/2023, 3:44 PM
You can check the type of the
content
property within a status handler. Here is an example: