cerebral-legacy / cerebral-module-forms

Form handling for Cerebral
http://cerebral-website.herokuapp.com/documentation/cerebral-module-forms
MIT License
12 stars 5 forks source link

onResponse returns json even though it might not be json #48

Closed edgesoft closed 7 years ago

edgesoft commented 7 years ago

We need to look at the actual response to make sure it's not just text. If we make a request to an api endpoint that does not exists it returns a String and will be Uncaught SyntaxError when parsed as json.