Update for new version of Rest protocol (errorCode->code)