fix misnamed error_code to code