<!--
{
  "documentType" : "article",
  "framework" : "CoreHaptics",
  "identifier" : "/documentation/CoreHaptics/error-constants",
  "metadataVersion" : "0.1.0",
  "role" : "collectionGroup",
  "title" : "Error Constants"
}
-->

# Error Constants

Error code constants for framework operations.

## Topics

### Error Code Constants

[`static var badEventEntry: CHHapticError.Code`](/documentation/CoreHaptics/CHHapticError/badEventEntry)

An event is missing a required field.

[`static var badParameterEntry: CHHapticError.Code`](/documentation/CoreHaptics/CHHapticError/badParameterEntry)

A parameter in an event is missing a required field.

[`static var engineNotRunning: CHHapticError.Code`](/documentation/CoreHaptics/CHHapticError/engineNotRunning)

Your app requested haptic playback when the engine wasn’t running.

[`static var engineStartTimeout: CHHapticError.Code`](/documentation/CoreHaptics/CHHapticError/engineStartTimeout)

The haptic engine timed out while starting.

[`static var fileNotFound: CHHapticError.Code`](/documentation/CoreHaptics/CHHapticError/fileNotFound)

The system couldn’t find an audio file or haptic asset.

[`static var insufficientPower: CHHapticError.Code`](/documentation/CoreHaptics/CHHapticError/insufficientPower)

The operation failed due to power restrictions.

[`static var invalidAudioResource: CHHapticError.Code`](/documentation/CoreHaptics/CHHapticError/invalidAudioResource)

A pattern dictionary or an event array contain a reference to an invalid audio resource.

[`static var invalidAudioSession: CHHapticError.Code`](/documentation/CoreHaptics/CHHapticError/invalidAudioSession)

The system invalidated the audio session associated with the haptic engine.

[`static var invalidEngineParameter: CHHapticError.Code`](/documentation/CoreHaptics/CHHapticError/invalidEngineParameter)

Your app attempted to initialize the haptic engine with an invalid configuration parameter.

[`static var invalidEventDuration: CHHapticError.Code`](/documentation/CoreHaptics/CHHapticError/invalidEventDuration)

An event in the dictionary has an invalid duration.

[`static var invalidEventTime: CHHapticError.Code`](/documentation/CoreHaptics/CHHapticError/invalidEventTime)

The time of an event in the dictionary is invalid.

[`static var invalidEventType: CHHapticError.Code`](/documentation/CoreHaptics/CHHapticError/invalidEventType)

The type of an event in the dictionary is invalid.

[`static var invalidParameterType: CHHapticError.Code`](/documentation/CoreHaptics/CHHapticError/invalidParameterType)

A pattern dictionary or parameter array contains an unknown or invalid parameter type.

[`static var invalidPatternData: CHHapticError.Code`](/documentation/CoreHaptics/CHHapticError/invalidPatternData)

Your app passed an invalid pattern to the haptic engine or player.

[`static var invalidPatternDictionary: CHHapticError.Code`](/documentation/CoreHaptics/CHHapticError/invalidPatternDictionary)

A pattern in the dictionary is missing a required field.

[`static var invalidPatternPlayer: CHHapticError.Code`](/documentation/CoreHaptics/CHHapticError/invalidPatternPlayer)

The current pattern player is no longer valid due to a server error.

[`static var invalidTime: CHHapticError.Code`](/documentation/CoreHaptics/CHHapticError/invalidTime)

The time offset passed to the haptic engine is invalid.

[`static var memoryError: CHHapticError.Code`](/documentation/CoreHaptics/CHHapticError/memoryError)

The operation failed due to a lack of memory.

[`static var notSupported: CHHapticError.Code`](/documentation/CoreHaptics/CHHapticError/notSupported)

The current device doesn’t support the haptic engine.

[`static var operationNotPermitted: CHHapticError.Code`](/documentation/CoreHaptics/CHHapticError/operationNotPermitted)

Your app requested an operation that the haptic engine disallows.

[`static var resourceNotAvailable: CHHapticError.Code`](/documentation/CoreHaptics/CHHapticError/resourceNotAvailable)

The framework didn’t locate a named resource.

[`static var serverInterrupted: CHHapticError.Code`](/documentation/CoreHaptics/CHHapticError/serverInterrupted)

Your app lost its connection to the haptic server.

[`static var serverInitFailed: CHHapticError.Code`](/documentation/CoreHaptics/CHHapticError/serverInitFailed)

The haptic server failed to initialize.

[`static var unknownError: CHHapticError.Code`](/documentation/CoreHaptics/CHHapticError/unknownError)

An operation failed due to an unknown error.



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)