Removed http_response_code(500);.