---
title: "DecodingError.keyNotFound(_:_:)"
framework: swift
role: symbol
role_heading: Case
path: "swift/decodingerror/keynotfound(_:_:)"
---

# DecodingError.keyNotFound(_:_:)

An indication that a keyed decoding container was asked for an entry for the given key, but did not contain one.

## Declaration

```swift
case keyNotFound(any CodingKey, DecodingError.Context)
```

## Discussion

Discussion As associated values, this case contains the attempted key and context for debugging.
