    enum Code

    extension https://developers.home.google.com/reference/swift/GoogleHomeSDK/Structs/HomeError.html.Code : Equatable, Hashable, RawRepresentable, Sendable, SendableMetatype

Error codes thrown by the GoogleHomeSDK.

Consistent with gRPC status codes: <https://grpc.io/docs/guides/status-codes/>
- `


  ### [cancelled](https://developers.home.google.com/reference/swift/GoogleHomeSDK/Structs/HomeError/Code#/s:13GoogleHomeSDK0B5ErrorV4CodeO9cancelledyA2EmF)


  ` The operation was cancelled (typically by the caller).

  #### Declaration

  Swift

      case cancelled

- `


  ### [unknown](https://developers.home.google.com/reference/swift/GoogleHomeSDK/Structs/HomeError/Code#/s:13GoogleHomeSDK0B5ErrorV4CodeO7unknownyA2EmF)


  ` Unknown error. An example of where this error may be returned is
  if a Status value received from another address space belongs to
  an error space that is not recognized in this address space.
  Also errors raised by APIs that do not return enough error information
  may be converted to this error.

  #### Declaration

  Swift

      case unknown

- `


  ### [invalidArgument](https://developers.home.google.com/reference/swift/GoogleHomeSDK/Structs/HomeError/Code#/s:13GoogleHomeSDK0B5ErrorV4CodeO15invalidArgumentyA2EmF)


  ` Client specified an invalid argument. Note that this differs
  from `FAILED_PRECONDITION`. `INVALID_ARGUMENT` indicates arguments
  that are problematic regardless of the state of the system
  (e.g., a malformed file name).

  #### Declaration

  Swift

      case invalidArgument

- `


  ### [deadlineExceeded](https://developers.home.google.com/reference/swift/GoogleHomeSDK/Structs/HomeError/Code#/s:13GoogleHomeSDK0B5ErrorV4CodeO16deadlineExceededyA2EmF)


  ` Deadline expired before operation could complete. For operations
  that change the state of the system, this error may be returned
  even if the operation has completed successfully. For example, a
  successful response from a server could have been delayed long
  enough for the deadline to expire.

  #### Declaration

  Swift

      case deadlineExceeded

- `


  ### [notFound](https://developers.home.google.com/reference/swift/GoogleHomeSDK/Structs/HomeError/Code#/s:13GoogleHomeSDK0B5ErrorV4CodeO8notFoundyA2EmF)


  ` Some requested entity (e.g., file or directory) was not found.

  #### Declaration

  Swift

      case notFound

- `


  ### [alreadyExists](https://developers.home.google.com/reference/swift/GoogleHomeSDK/Structs/HomeError/Code#/s:13GoogleHomeSDK0B5ErrorV4CodeO13alreadyExistsyA2EmF)


  ` The entity that a client attempted to create (e.g., file or directory)
  already exists.

  #### Declaration

  Swift

      case alreadyExists

- `


  ### [permissionDenied](https://developers.home.google.com/reference/swift/GoogleHomeSDK/Structs/HomeError/Code#/s:13GoogleHomeSDK0B5ErrorV4CodeO16permissionDeniedyA2EmF)


  ` The caller does not have permission to execute the specified
  operation. `PERMISSION_DENIED` must not be used for rejections
  caused by exhausting some resource (use `RESOURCE_EXHAUSTED` instead for
  those errors). `PERMISSION_DENIED` must not be used if the caller
  can not be identified (use `UNAUTHENTICATED` instead for those errors).

  #### Declaration

  Swift

      case permissionDenied

- `


  ### [resourceExhausted](https://developers.home.google.com/reference/swift/GoogleHomeSDK/Structs/HomeError/Code#/s:13GoogleHomeSDK0B5ErrorV4CodeO17resourceExhaustedyA2EmF)


  ` Some resource has been exhausted, perhaps a per-user quota, or
  perhaps the entire file system is out of space.

  #### Declaration

  Swift

      case resourceExhausted

- `


  ### [failedPrecondition](https://developers.home.google.com/reference/swift/GoogleHomeSDK/Structs/HomeError/Code#/s:13GoogleHomeSDK0B5ErrorV4CodeO18failedPreconditionyA2EmF)


  ` Operation was rejected because the system is not in a state
  required for the operation's execution. For example, directory
  to be deleted may be non-empty, an rmdir operation is applied to
  a non-directory, etc.

  A litmus test that may help a service implementor in deciding
  between `FAILED_PRECONDITION` and `UNAVAILABLE`:
  (a) If the client can retry just the failing call, it should be
  `UNAVAILABLE`.
  (b) If the client should retry at a higher-level (e.g., restarting
  a read-only session or transaction), `FAILED_PRECONDITION` should be
  returned.

  #### Declaration

  Swift

      case failedPrecondition

- `


  ### [aborted](https://developers.home.google.com/reference/swift/GoogleHomeSDK/Structs/HomeError/Code#/s:13GoogleHomeSDK0B5ErrorV4CodeO7abortedyA2EmF)


  ` The operation was aborted, typically due to a concurrency issue such as
  a sequencer check failure or transaction abort.

  See the guidelines above for deciding between `FAILED_PRECONDITION` and
  `ABORTED`.

  #### Declaration

  Swift

      case aborted

- `


  ### [outOfRange](https://developers.home.google.com/reference/swift/GoogleHomeSDK/Structs/HomeError/Code#/s:13GoogleHomeSDK0B5ErrorV4CodeO10outOfRangeyA2EmF)


  ` The operation was attempted past the valid range. E.g., seeking or
  reading past end of file.

  Unlike `INVALID_ARGUMENT`, this error indicates a problem that may
  be fixed if the system state changes. For example, a 32-bit file
  system will generate `OUT_OF_RANGE` if an attempt is made to write a
  file that is larger than the system is capable of supporting.

  `OUT_OF_RANGE` must not be used for errors arising from attempting
  to read from an empty file, or to seek past EOF.

  #### Declaration

  Swift

      case outOfRange

- `


  ### [unimplemented](https://developers.home.google.com/reference/swift/GoogleHomeSDK/Structs/HomeError/Code#/s:13GoogleHomeSDK0B5ErrorV4CodeO13unimplementedyA2EmF)


  ` The operation is not implemented or is not supported/enabled in this service.

  #### Declaration

  Swift

      case unimplemented

- `


  ### [internal](https://developers.home.google.com/reference/swift/GoogleHomeSDK/Structs/HomeError/Code#/s:13GoogleHomeSDK0B5ErrorV4CodeO8internalyA2EmF)


  ` Internal errors. This means that some invariants expected by the
  underlying system have been broken. This error code is reserved
  for serious errors.

  #### Declaration

  Swift

      case `internal`

- `


  ### [unavailable](https://developers.home.google.com/reference/swift/GoogleHomeSDK/Structs/HomeError/Code#/s:13GoogleHomeSDK0B5ErrorV4CodeO11unavailableyA2EmF)


  ` The service is currently unavailable. This is most likely a transient
  condition, which can be corrected by retrying with a backoff.

  See the guidelines above for deciding between `FAILED_PRECONDITION` and
  `UNAVAILABLE`.

  #### Declaration

  Swift

      case unavailable

- `


  ### [dataLoss](https://developers.home.google.com/reference/swift/GoogleHomeSDK/Structs/HomeError/Code#/s:13GoogleHomeSDK0B5ErrorV4CodeO8dataLossyA2EmF)


  ` Unrecoverable data loss or corruption.

  #### Declaration

  Swift

      case dataLoss

- `


  ### [unauthenticated](https://developers.home.google.com/reference/swift/GoogleHomeSDK/Structs/HomeError/Code#/s:13GoogleHomeSDK0B5ErrorV4CodeO15unauthenticatedyA2EmF)


  ` The user is not authenticated.

  #### Declaration

  Swift

      case unauthenticated

- `


  ### [commandFailed](https://developers.home.google.com/reference/swift/GoogleHomeSDK/Structs/HomeError/Code#/s:13GoogleHomeSDK0B5ErrorV4CodeO13commandFailedyA2EmF)


  ` The command failed to execute. Please check the subcodes for more details.

  #### Declaration

  Swift

      case commandFailed

- `


  ### [writeFailed](https://developers.home.google.com/reference/swift/GoogleHomeSDK/Structs/HomeError/Code#/s:13GoogleHomeSDK0B5ErrorV4CodeO11writeFailedyA2EmF)


  ` The write failed to execute. Please check the subcodes for more details.

  #### Declaration

  Swift

      case writeFailed

- `


  ### [galError](https://developers.home.google.com/reference/swift/GoogleHomeSDK/Structs/HomeError/Code#/s:13GoogleHomeSDK0B5ErrorV4CodeO03galD0yA2EmF)


  ` Google Account Linking (GAL) error.

  This error occurs when communication with a third-party partner fails because the link
  between the user's Google account and the third-party account is missing, invalid, or
  requires user intervention (e.g. token expiry, missing consent).

  Resolution typically requires the user to re-link their account in the Google Home App.

  #### Declaration

  Swift

      case galError

- `


  ### [init(rawValue:)](https://developers.home.google.com/reference/swift/GoogleHomeSDK/Structs/HomeError/Code#/s:13GoogleHomeSDK0B5ErrorV4CodeO8rawValueAESgSi_tcfc)


  ` Creates a new instance with the specified raw value.

  If there is no value of the type that corresponds with the specified raw
  value, this initializer returns `nil`. For example:

      enum PaperSize: String {
          case A4, A5, Letter, Legal
      }

      print(PaperSize(rawValue: "Legal"))
      // Prints "Optional(PaperSize.Legal)"

      print(PaperSize(rawValue: "Tabloid"))
      // Prints "nil"

  #### Declaration

  Swift

      init?(rawValue: Int)

  #### Parameters

  |---|---|
  | ` rawValue ` | The raw value to use for the new instance. |