# TasksErrorCode

    enum TasksErrorCode: Sendable, Equatable, Hashable, CaseIterable, RawRepresentable

Error codes thrown by the MediaPipe Tasks library.
- `
  ### [aborted](https://developers.google.com/edge/api/mediapipe/swift/common/Enums/TasksErrorCode.md.txt#/s:20MediaPipeTasksCommon0C9ErrorCodeO7abortedyA2CmF)

  ` Indicates the operation was aborted, typically due to a concurrency or transaction failure.

  #### Declaration

  Swift

      case aborted

- `
  ### [alreadyExists](https://developers.google.com/edge/api/mediapipe/swift/common/Enums/TasksErrorCode.md.txt#/s:20MediaPipeTasksCommon0C9ErrorCodeO13alreadyExistsyA2CmF)

  ` Indicates that the entity a caller attempted to create is already present.

  #### Declaration

  Swift

      case alreadyExists

- `
  ### [audioRecordNotTappingMic](https://developers.google.com/edge/api/mediapipe/swift/common/Enums/TasksErrorCode.md.txt#/s:20MediaPipeTasksCommon0C9ErrorCodeO24audioRecordNotTappingMicyA2CmF)

  ` Indicates that `AudioRecord` is not tapping the microphone.

  #### Declaration

  Swift

      case audioRecordNotTappingMic

- `
  ### [audioRecordPermissionDenied](https://developers.google.com/edge/api/mediapipe/swift/common/Enums/TasksErrorCode.md.txt#/s:20MediaPipeTasksCommon0C9ErrorCodeO27audioRecordPermissionDeniedyA2CmF)

  ` Indicates that audio record permissions were denied by the user.

  #### Declaration

  Swift

      case audioRecordPermissionDenied

- `
  ### [audioRecordPermissionUndetermined](https://developers.google.com/edge/api/mediapipe/swift/common/Enums/TasksErrorCode.md.txt#/s:20MediaPipeTasksCommon0C9ErrorCodeO33audioRecordPermissionUndeterminedyA2CmF)

  ` Indicates that audio record permissions cannot be determined.

  #### Declaration

  Swift

      case audioRecordPermissionUndetermined

- `
  ### [audioRecordWaitingForNewMicInput](https://developers.google.com/edge/api/mediapipe/swift/common/Enums/TasksErrorCode.md.txt#/s:20MediaPipeTasksCommon0C9ErrorCodeO32audioRecordWaitingForNewMicInputyA2CmF)

  ` Indicates that `AudioRecord` is waiting for new microphone input.

  #### Declaration

  Swift

      case audioRecordWaitingForNewMicInput

- `
  ### [cancelled](https://developers.google.com/edge/api/mediapipe/swift/common/Enums/TasksErrorCode.md.txt#/s:20MediaPipeTasksCommon0C9ErrorCodeO9cancelledyA2CmF)

  ` Indicates the operation was cancelled, typically by the caller.

  #### Declaration

  Swift

      case cancelled

- `
  ### [dataLoss](https://developers.google.com/edge/api/mediapipe/swift/common/Enums/TasksErrorCode.md.txt#/s:20MediaPipeTasksCommon0C9ErrorCodeO8dataLossyA2CmF)

  ` Indicates that unrecoverable data loss or corruption has occurred.

  #### Declaration

  Swift

      case dataLoss

- `
  ### [deadlineExceeded](https://developers.google.com/edge/api/mediapipe/swift/common/Enums/TasksErrorCode.md.txt#/s:20MediaPipeTasksCommon0C9ErrorCodeO16deadlineExceededyA2CmF)

  ` Indicates a deadline expired before the operation could complete.

  #### Declaration

  Swift

      case deadlineExceeded

- `
  ### [failedPrecondition](https://developers.google.com/edge/api/mediapipe/swift/common/Enums/TasksErrorCode.md.txt#/s:20MediaPipeTasksCommon0C9ErrorCodeO18failedPreconditionyA2CmF)

  ` Indicates that the operation was rejected because the system is not in a required state.

  #### Declaration

  Swift

      case failedPrecondition

- `
  ### [internalError](https://developers.google.com/edge/api/mediapipe/swift/common/Enums/TasksErrorCode.md.txt#/s:20MediaPipeTasksCommon0C9ErrorCodeO08internalE0yA2CmF)

  ` Indicates an internal error has occurred and underlying system invariants were violated.

  #### Declaration

  Swift

      case internalError

- `
  ### [invalidArgument](https://developers.google.com/edge/api/mediapipe/swift/common/Enums/TasksErrorCode.md.txt#/s:20MediaPipeTasksCommon0C9ErrorCodeO15invalidArgumentyA2CmF)

  ` Indicates the caller specified an invalid argument, such as a malformed filename.

  #### Declaration

  Swift

      case invalidArgument

- `
  ### [notFound](https://developers.google.com/edge/api/mediapipe/swift/common/Enums/TasksErrorCode.md.txt#/s:20MediaPipeTasksCommon0C9ErrorCodeO8notFoundyA2CmF)

  ` Indicates some requested entity (such as a file or directory) was not found.

  #### Declaration

  Swift

      case notFound

- `
  ### [outOfRange](https://developers.google.com/edge/api/mediapipe/swift/common/Enums/TasksErrorCode.md.txt#/s:20MediaPipeTasksCommon0C9ErrorCodeO10outOfRangeyA2CmF)

  ` Indicates the operation was attempted past the valid range.

  #### Declaration

  Swift

      case outOfRange

- `
  ### [permissionDenied](https://developers.google.com/edge/api/mediapipe/swift/common/Enums/TasksErrorCode.md.txt#/s:20MediaPipeTasksCommon0C9ErrorCodeO16permissionDeniedyA2CmF)

  ` Indicates that the caller does not have permission to execute the specified operation.

  #### Declaration

  Swift

      case permissionDenied

- `
  ### [resourceExhausted](https://developers.google.com/edge/api/mediapipe/swift/common/Enums/TasksErrorCode.md.txt#/s:20MediaPipeTasksCommon0C9ErrorCodeO17resourceExhaustedyA2CmF)

  ` Indicates some resource has been exhausted, such as a per-user quota or disk space.

  #### Declaration

  Swift

      case resourceExhausted

- `
  ### [unauthenticated](https://developers.google.com/edge/api/mediapipe/swift/common/Enums/TasksErrorCode.md.txt#/s:20MediaPipeTasksCommon0C9ErrorCodeO15unauthenticatedyA2CmF)

  ` Indicates that the request does not have valid authentication credentials.

  #### Declaration

  Swift

      case unauthenticated

- `
  ### [unavailable](https://developers.google.com/edge/api/mediapipe/swift/common/Enums/TasksErrorCode.md.txt#/s:20MediaPipeTasksCommon0C9ErrorCodeO11unavailableyA2CmF)

  ` Indicates the service is currently unavailable, typically as a transient condition.

  #### Declaration

  Swift

      case unavailable

- `
  ### [unimplemented](https://developers.google.com/edge/api/mediapipe/swift/common/Enums/TasksErrorCode.md.txt#/s:20MediaPipeTasksCommon0C9ErrorCodeO13unimplementedyA2CmF)

  ` Indicates the operation is not implemented or supported.

  #### Declaration

  Swift

      case unimplemented

- `
  ### [unknown](https://developers.google.com/edge/api/mediapipe/swift/common/Enums/TasksErrorCode.md.txt#/s:20MediaPipeTasksCommon0C9ErrorCodeO7unknownyA2CmF)

  ` Indicates an unknown error occurred.

  #### Declaration

  Swift

      case unknown

- `
  ### [allCases](https://developers.google.com/edge/api/mediapipe/swift/common/Enums/TasksErrorCode.md.txt#/s:20MediaPipeTasksCommon0C9ErrorCodeO8allCasesSayACGvpZ)

  ` A collection of all values of this type.

  #### Declaration

  Swift

      nonisolated static var allCases: [TasksErrorCode] { get }

- `
  ### [init(rawValue:)](https://developers.google.com/edge/api/mediapipe/swift/common/Enums/TasksErrorCode.md.txt#/s:20MediaPipeTasksCommon0C9ErrorCodeO8rawValueACSgSi_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. |

- `
  ### [defaultDescription](https://developers.google.com/edge/api/mediapipe/swift/common/Enums/TasksErrorCode.md.txt#/s:20MediaPipeTasksCommon0C9ErrorCodeO18defaultDescriptionSSvp)

  ` Fallback human-readable description when an explicit error message is unavailable.

  #### Declaration

  Swift

      var defaultDescription: String { get }

- `
  ### [rawValue](https://developers.google.com/edge/api/mediapipe/swift/common/Enums/TasksErrorCode.md.txt#/s:20MediaPipeTasksCommon0C9ErrorCodeO8rawValueSivp)

  ` The corresponding value of the raw type.

  A new instance initialized with `rawValue` will be equivalent to this instance. For example:

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

  let selectedSize = PaperSize.Letter print(selectedSize.rawValue) // Prints "Letter"

  print(selectedSize == PaperSize(rawValue: selectedSize.rawValue)!) // Prints "true"

  #### Declaration

  Swift

      var rawValue: Int { get }

- `
  ### [AllCases](https://developers.google.com/edge/api/mediapipe/swift/common/Enums/TasksErrorCode.md.txt#/s:20MediaPipeTasksCommon0C9ErrorCodeO8AllCasesa)

  ` A type that can represent a collection of all values of this type.

  #### Declaration

  Swift

      typealias AllCases = [TasksErrorCode]