kachnitel / ridetime-server

RideTime app server
MIT License
2 stars 1 forks source link

Error reporting #6

Open kachnitel opened 5 years ago

kachnitel commented 5 years ago

Create an error logging middleware and return proper error responses.

Note: error_reporting(E_STRICT); causes PHP Fatal error: Declaration of RideTimeServer\\API\\Endpoints\\Endpoint::__construct(RideTimeServer\\API\\Endpoints\\EntityManager $entityManager) must be compatible with RideTimeServer\\API\\Endpoints\\EndpointInterface::__construct(Doctrine\\ORM\\EntityManager $entityManager) in /home/kachna/workspace/projects/ridetime-server/src/API/Endpoints/UserEndpoint.php on line 9 to be silent (no log, no response, just code 500)

kachnitel commented 5 years ago

https://packagist.org/packages/juliangut/slim-exception https://www.slimframework.com/docs/v3/handlers/error.html