Return 500 response for invalid output errors.