handle "error_code" case