I'm having this interesting issue where I have this handler which returns json normally but on certain condition there's requirement where I need to return html response back. Therefore in my handler I need to figure out when to return json and when to return html response. I naively tried :
I'm having this interesting issue where I have this handler which returns json normally but on certain condition there's requirement where I need to return html response back. Therefore in my handler I need to figure out when to return json and when to return html response. I naively tried :
but seems the output formatters are overriding this. Any ideas how to solve it ?