Closed parktrip closed 7 years ago
@parktrip Thank you for using it. Yes, it should be 500 status code. For XmlHttpRequest, the content-type = 'application/json' is not a must, it can be text/html also depends on how we set in the message in the config. I've added check content for it.
Released ErrorHeroModule 1.3.1 for it, enjoy ;)
Thank you for your reactivity, I will have a look at it as soon as possible.
Dear samsonasik,
first thank you for your useful module.
I have just noticed something that bothered me a bit: if your module catches an error while doing an ajax call (the '$request->isXmlHttpRequest()' is a bit restricted as I would like to use it performing json calls but that's another story :) ), the ajax message set in the config is displayed as expected but with an 200 HTTP code. That's make difficult if not impossible to catch this failure at client side level. Is there any way to change this and set a different HTTP code (500 would be the one IMO) ? And set as well a proper Content-type header (text/html at the moment which is not correct).
Regards,