Catch exceptions and return them as 500