-
Notifications
You must be signed in to change notification settings - Fork 51
Getting Apigility to return a 500 response on a PHP Fatal Error #157
Comments
Well I certainly agree that this shouldn't return a 200...Any input from regular contributors? |
Error handling is the responsibility of each application and does not fall into the scope of Apigility. |
@TomHAnderson Normally I'd agree, but I seem to keep running into places where Apigility is interfering with the normal request lifecycle or places where it's returning 200 or 500 when an error is happening before it can ever hit my try/catch block. Do you know of any resources that document the Apigility request lifecycle? I think this would be a helpful tool for debugging and something that the community could help contribute to the docs. |
If you would study the code and create the docs you're asking about I'm sure they could be included. |
This repository has been closed and moved to laminas-api-tools/api-tools; a new issue has been opened at laminas-api-tools/api-tools#33. |
When PHP throws a fatal error, it spits out the HTML representation of error and it does so with a response code of 200.
Should these not be getting caught by Apigility and handled as 500 errors? Is there an extra step I need to take to achieve this, guidance on best practice?
The text was updated successfully, but these errors were encountered: