check errorCode