craftcms / element-api

Create a JSON API/Feed for your elements in Craft.
MIT License
498 stars 57 forks source link

Exceptions: output html #39

Closed qrazi closed 7 years ago

qrazi commented 7 years ago

So I just installed this plugin (v1, 1.4.0) and had an Exception occur because I was trying to use a property on the Entry model that does not exist. To my surprise the output to the browser was the default html output. But since the JSON headers were already output, the browser just shows the html source of what otherwise would be a normal page showing error details.

Did I miss something, or is this an idea for a feature request?

brandonkelly commented 7 years ago

Thanks for pointing that out!