---
title: MLModelError.Code
framework: coreml
role: symbol
role_heading: Enumeration
path: coreml/mlmodelerror-swift.struct/code
---

# MLModelError.Code

Information about a Core ML model error.

## Declaration

```swift
enum Code
```

## Topics

### Error codes

- [MLModelError.Code.featureType](coreml/mlmodelerror-swift.struct/code/featuretype.md)
- [MLModelError.Code.parameters](coreml/mlmodelerror-swift.struct/code/parameters.md)
- [MLModelError.Code.modelCollection](coreml/mlmodelerror-swift.struct/code/modelcollection.md)
- [MLModelError.Code.modelDecryptionKeyFetch](coreml/mlmodelerror-swift.struct/code/modeldecryptionkeyfetch.md)
- [MLModelError.Code.modelDecryption](coreml/mlmodelerror-swift.struct/code/modeldecryption.md)
- [MLModelError.Code.update](coreml/mlmodelerror-swift.struct/code/update.md)
- [MLModelError.Code.customLayer](coreml/mlmodelerror-swift.struct/code/customlayer.md)
- [MLModelError.Code.customModel](coreml/mlmodelerror-swift.struct/code/custommodel.md)
- [MLModelError.Code.io](coreml/mlmodelerror-swift.struct/code/io.md)
- [MLModelError.Code.predictionCancelled](coreml/mlmodelerror-swift.struct/code/predictioncancelled.md)
- [MLModelError.Code.generic](coreml/mlmodelerror-swift.struct/code/generic.md)

### Error domain

- [MLModelErrorDomain](coreml/mlmodelerrordomain.md)
- [errorDomain](coreml/mlmodelerror-swift.struct/errordomain.md)

### Creating a model error

- [init(rawValue:)](coreml/mlmodelerror-swift.struct/code/init(rawvalue:).md)

## Relationships

### Conforms To

- [BitwiseCopyable](swift/bitwisecopyable.md)
- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)
- [RawRepresentable](swift/rawrepresentable.md)
- [Sendable](swift/sendable.md)
- [SendableMetatype](swift/sendablemetatype.md)

## See Also

### Model errors

- [MLModelError](coreml/mlmodelerror-swift.struct.md)
- [MLModelErrorDomain](coreml/mlmodelerrordomain.md)
