Fix test case for error_code