errorCode property

String? errorCode
getter/setter pair

If the command failed, an error code explaining the failure.

This is not set when the command is cancelled by the caller. For reasoning about command errors, prefer fields in the following order (most preferred first): 1. Command-specific fields like clearAppsDataStatus, startLostModeStatus, or similar, if they exist. 2. This field, if set. 3. The generic error field in the Operation that wraps the command. Possible string values are:

  • "COMMAND_ERROR_CODE_UNSPECIFIED" : There was no error.
  • "UNKNOWN" : An unknown error occurred.
  • "API_LEVEL" : The API level of the device does not support this command.
  • "MANAGEMENT_MODE" : The management mode (profile owner, device owner, etc.) does not support the command.
  • "INVALID_VALUE" : The command has an invalid parameter value.
  • "UNSUPPORTED" : The device doesn't support the command. Updating Android Device Policy to the latest version may resolve the issue.

Implementation

core.String? errorCode;