---
title: underlyingErrors
framework: foundation
role: symbol
role_heading: Instance Property
path: foundation/cocoaerror/underlyingerrors
---

# underlyingErrors

A list of underlying errors, if any. It includes the values of both NSUnderlyingErrorKey and NSMultipleUnderlyingErrorsKey. If there are no underlying errors, returns an empty array.

## Declaration

```swift
var underlyingErrors: [any Error] { get }
```
