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

# MLModelError.Code.customModel

An error code for problems related to custom models.

## Declaration

```swift
case customModel
```

## Discussion

Discussion Core ML typically throws (Swift) or returns (Objective-C) this error when the custom model has a programming mistake. For example, a custom model’s prediction method fails with this error code if Core ML can’t find the custom model’s implementation.

## See Also

### 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.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)
