CFY-417 added error handler for 500 internal server errors