Open wspurgin opened 9 years ago
The die statement here is meant to convey an error, but a die statement returns 200 by default. Which means when there are errors on the backend with connecting to mysql, the front end treats it as a good response (which is causing a few errors).
Since you're using slim, you can use it to return proper status codes instead of just the php die statement. Here are the docs for that http://docs.slimframework.com/#Response-Status
Cheers
Great, thanks for this resource.
The die statement here is meant to convey an error, but a die statement returns 200 by default. Which means when there are errors on the backend with connecting to mysql, the front end treats it as a good response (which is causing a few errors).
Since you're using slim, you can use it to return proper status codes instead of just the php die statement. Here are the docs for that http://docs.slimframework.com/#Response-Status
Cheers