update error code for task api