With this change we allow FPM to cleanup its resources and make sure we log things properly.
The user will no longer see {"message": "Internal server error"}. They will see:
❯ curl -I https://foobar.execute-api.eu-central-1.amazonaws.com/dev
HTTP/2 500
content-type: application/json
content-length: 0
date: Mon, 27 Jul 2020 08:13:18 GMT
x-amzn-requestid: 4ba9fbb8-e559-455e-ab50-75b5cb87be22
x-amz-apigw-id: QUroliAFt9A=
x-amzn-trace-id: Root=1-5f1e8c9a-5e00490e;Sampled=0
x-cache: Error from cloudfront
via: 1.1 208ed8b46a4d.cloudfront.net (CloudFront)
x-amz-cf-pop: ARN4-C2
x-amz-cf-id: LvgYYbNbSkYx_lL-eKZqpJZw==

This is a draft PR, I'll see if I can do better.
该提问来源于开源项目:brefphp/bref