<!--
{
  "documentType" : "article",
  "framework" : "CoreMIDI",
  "identifier" : "/documentation/CoreMIDI/midi-services-errors",
  "metadataVersion" : "0.1.0",
  "role" : "collectionGroup",
  "title" : "MIDI Services Errors"
}
-->

# MIDI Services Errors

Error codes for Core MIDI operations XX.

## Topics

### Error Codes

[`var kMIDIInvalidClient: OSStatus`](/documentation/CoreMIDI/kMIDIInvalidClient)

The client is invalid.

[`var kMIDIInvalidPort: OSStatus`](/documentation/CoreMIDI/kMIDIInvalidPort)

The port is invalid.

[`var kMIDIWrongEndpointType: OSStatus`](/documentation/CoreMIDI/kMIDIWrongEndpointType)

A function received a source endpoint when it required a destination endpoint, or vice versa.

[`var kMIDINoConnection: OSStatus`](/documentation/CoreMIDI/kMIDINoConnection)

The connection you’re trying to close doesn’t exist.

[`var kMIDIUnknownEndpoint: OSStatus`](/documentation/CoreMIDI/kMIDIUnknownEndpoint)

The system doesn’t recognize the endpoint.

[`var kMIDIUnknownProperty: OSStatus`](/documentation/CoreMIDI/kMIDIUnknownProperty)

The property you’re trying to query isn’t set on the object.

[`var kMIDIWrongPropertyType: OSStatus`](/documentation/CoreMIDI/kMIDIWrongPropertyType)

The value you assigned to the property is the wrong type.

[`var kMIDINoCurrentSetup: OSStatus`](/documentation/CoreMIDI/kMIDINoCurrentSetup)

A MIDI setup object doesn’t currently exist.

[`var kMIDIMessageSendErr: OSStatus`](/documentation/CoreMIDI/kMIDIMessageSendErr)

The communication with the MIDI server failed.

[`var kMIDIServerStartErr: OSStatus`](/documentation/CoreMIDI/kMIDIServerStartErr)

The system can’t start the MIDI server.

[`var kMIDISetupFormatErr: OSStatus`](/documentation/CoreMIDI/kMIDISetupFormatErr)

The system can’t read the saved state.

[`var kMIDIWrongThread: OSStatus`](/documentation/CoreMIDI/kMIDIWrongThread)

A driver is calling a non-I/O function in the server from a thread other than the server’s main thread.

[`var kMIDIObjectNotFound: OSStatus`](/documentation/CoreMIDI/kMIDIObjectNotFound)

The requested object doesn’t exist.

[`var kMIDIIDNotUnique: OSStatus`](/documentation/CoreMIDI/kMIDIIDNotUnique)

The identifier you’re trying to set isn’t unique.

[`var kMIDINotPermitted: OSStatus`](/documentation/CoreMIDI/kMIDINotPermitted)

The process doesn’t have privileges for the requested operation.

[`var kMIDIUnknownError: OSStatus`](/documentation/CoreMIDI/kMIDIUnknownError)

The system can’t perform the requested operation.



---

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)