---
title: DecodingError
framework: swift
role: symbol
role_heading: Enumeration
path: swift/decodingerror
---

# DecodingError

An error that occurs during the decoding of a value.

## Declaration

```swift
enum DecodingError
```

## Topics

### Structures

- [DecodingError.Context](swift/decodingerror/context.md)

### Enumeration Cases

- [DecodingError.dataCorrupted(_:)](swift/decodingerror/datacorrupted(_:).md)
- [DecodingError.keyNotFound(_:_:)](swift/decodingerror/keynotfound(_:_:).md)
- [DecodingError.typeMismatch(_:_:)](swift/decodingerror/typemismatch(_:_:).md)
- [DecodingError.valueNotFound(_:_:)](swift/decodingerror/valuenotfound(_:_:).md)

### Type Methods

- [dataCorruptedError(forKey:in:debugDescription:)](swift/decodingerror/datacorruptederror(forkey:in:debugdescription:).md)
- [dataCorruptedError(in:debugDescription:)](swift/decodingerror/datacorruptederror(in:debugdescription:)-4ruvu.md)
- [dataCorruptedError(in:debugDescription:)](swift/decodingerror/datacorruptederror(in:debugdescription:)-5on9z.md)

### Default Implementations

- [CustomDebugStringConvertible Implementations](swift/decodingerror/customdebugstringconvertible-implementations.md)

## Relationships

### Conforms To

- [Copyable](swift/copyable.md)
- [CustomDebugStringConvertible](swift/customdebugstringconvertible.md)
- [Error](swift/error.md)
- [Escapable](swift/escapable.md)
- [LocalizedError](foundation/localizederror.md)
- [Sendable](swift/sendable.md)
- [SendableMetatype](swift/sendablemetatype.md)

## See Also

### Encoders and Decoders

- [Encoder](swift/encoder.md)
- [Decoder](swift/decoder.md)
- [EncodingError](swift/encodingerror.md)
