<!--
{
  "availability" : [
    "iOS: 26.0.0 -",
    "iPadOS: 26.0.0 -",
    "macOS: 26.0.0 -",
    "visionOS: 26.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "PaperKit",
  "identifier" : "/documentation/PaperKit/MarkupError",
  "metadataVersion" : "0.1.0",
  "role" : "Enumeration",
  "symbol" : {
    "kind" : "Enumeration",
    "modules" : [
      "PaperKit"
    ],
    "preciseIdentifier" : "s:8PaperKit11MarkupErrorO"
  },
  "title" : "MarkupError"
}
-->

# MarkupError

The error thrown for encoding / decoding data models.

```
enum MarkupError
```

## Topics

### Handling error cases

[`case incorrectFormat`](/documentation/PaperKit/MarkupError/incorrectFormat)

Incorrect format or header.

[`case malformedData`](/documentation/PaperKit/MarkupError/malformedData)

The binary data was malformed in some way.

[`case incompatibleFormatTooNew`](/documentation/PaperKit/MarkupError/incompatibleFormatTooNew)

The data being decoded has a newer format that cannot be decoded.

## Relationships

### Conforms To

[`Hashable`](/documentation/Swift/Hashable)

[`Equatable`](/documentation/Swift/Equatable)

[`Error`](/documentation/Swift/Error)

[`SendableMetatype`](/documentation/Swift/SendableMetatype)

[`Sendable`](/documentation/Swift/Sendable)

---

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)