<!--
{
  "documentType" : "article",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/appkit-errors",
  "metadataVersion" : "0.1.0",
  "role" : "collectionGroup",
  "title" : "AppKit Errors"
}
-->

# AppKit Errors

These constants represent errors generated by AppKit.

## Discussion

The returned constants from an `NSError` object.

## Topics

### Error Codes

[`NSFontAssetDownloadError`](/documentation/AppKit/NSFontAssetDownloadError)

[`NSFontErrorMaximum`](/documentation/AppKit/NSFontErrorMaximum)

[`NSFontErrorMinimum`](/documentation/AppKit/NSFontErrorMinimum)

[`NSTextReadInapplicableDocumentTypeError`](/documentation/AppKit/NSTextReadInapplicableDocumentTypeError)

Indicates a problem reading data with the specified format.

[`NSTextWriteInapplicableDocumentTypeError`](/documentation/AppKit/NSTextWriteInapplicableDocumentTypeError)

Indicates a problem writing data of the specified format.

[`NSTextReadWriteErrorMinimum`](/documentation/AppKit/NSTextReadWriteErrorMinimum)

The beginning of a range of error codes reserved for future use.

[`NSTextReadWriteErrorMaximum`](/documentation/AppKit/NSTextReadWriteErrorMaximum)

The end of a range of error codes reserved for future use.

[`NSServiceApplicationLaunchFailedError`](/documentation/AppKit/NSServiceApplicationLaunchFailedError)

The service providing application could not be launched.  This will typically contain an underlying error with an Launch Services error code.

[`NSServiceApplicationNotFoundError`](/documentation/AppKit/NSServiceApplicationNotFoundError)

The service provider could not be found.

[`NSServiceErrorMaximum`](/documentation/AppKit/NSServiceErrorMaximum)

Inclusive service error range, for checking future error codes.

[`NSServiceErrorMinimum`](/documentation/AppKit/NSServiceErrorMinimum)

Inclusive service error range, for checking future error codes.

[`NSServiceInvalidPasteboardDataError`](/documentation/AppKit/NSServiceInvalidPasteboardDataError)

The service providing app did not return a pasteboard with any of the promised types, or we couldn’t write the data from the pasteboard to the object receiving the returned data.

[`NSServiceMalformedServiceDictionaryError`](/documentation/AppKit/NSServiceMalformedServiceDictionaryError)

The service dictionary did not contain the necessary keys.  Messages will typically be logged to the console giving more details.

[`NSServiceMiscellaneousError`](/documentation/AppKit/NSServiceMiscellaneousError)

Other errors, representing programmatic mistakes in the service consuming application.  These show a generic error message to the user.

[`NSServiceRequestTimedOutError`](/documentation/AppKit/NSServiceRequestTimedOutError)

The service providing application did not open its service listening port in time, or the app didn’t respond to the request in time; see the Console log to figure out which (the errors are typically reported the same way to the user).

[`NSSharingServiceErrorMaximum`](/documentation/AppKit/NSSharingServiceErrorMaximum)

[`NSSharingServiceErrorMinimum`](/documentation/AppKit/NSSharingServiceErrorMinimum)

[`NSSharingServiceNotConfiguredError`](/documentation/AppKit/NSSharingServiceNotConfiguredError)

[`var NSWorkspaceAuthorizationInvalidError: Int`](/documentation/AppKit/NSWorkspaceAuthorizationInvalidError)

The provided workspace authorization credentials expired or are invalid.

[`var NSWorkspaceErrorMaximum: Int`](/documentation/AppKit/NSWorkspaceErrorMaximum)

[`var NSWorkspaceErrorMinimum: Int`](/documentation/AppKit/NSWorkspaceErrorMinimum)

[`var NSWindowSharingErrorMaximum: Int`](/documentation/AppKit/NSWindowSharingErrorMaximum)

[`var NSWindowSharingErrorMinimum: Int`](/documentation/AppKit/NSWindowSharingErrorMinimum)

[`var NSWindowSharingRequestAlreadyRequested: Int`](/documentation/AppKit/NSWindowSharingRequestAlreadyRequested)

[`var NSWindowSharingRequestNoEligibleSession: Int`](/documentation/AppKit/NSWindowSharingRequestNoEligibleSession)

[`var NSWindowSharingRequestUnspecifiedError: Int`](/documentation/AppKit/NSWindowSharingRequestUnspecifiedError)

[`var NSPasteboardMiscellaneousError: Int`](/documentation/AppKit/NSPasteboardMiscellaneousError)

[`var NSPasteboardCommunicationError: Int`](/documentation/AppKit/NSPasteboardCommunicationError)

[`var NSPasteboardInvalidArgumentError: Int`](/documentation/AppKit/NSPasteboardInvalidArgumentError)

[`var NSPasteboardContentsNotAvailableError: Int`](/documentation/AppKit/NSPasteboardContentsNotAvailableError)

[`var NSPasteboardErrorMinimum: Int`](/documentation/AppKit/NSPasteboardErrorMinimum)

[`var NSPasteboardErrorMaximum: Int`](/documentation/AppKit/NSPasteboardErrorMaximum)



---

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)