Make errorhandler send HTTP error 500 on error