---
title: underlyingError
framework: swift
role: symbol
role_heading: Instance Property
path: swift/decodingerror/context/underlyingerror
---

# underlyingError

The underlying error which caused this error, if any.

## Declaration

```swift
let underlyingError: (any Error)?
```
