---
title: decodeErrorType()
framework: distributed
role: symbol
role_heading: Instance Method
path: distributed/distributedtargetinvocationdecoder/decodeerrortype()
---

# decodeErrorType()

Decode the specific error type that the distributed invocation target has recorded. Currently this effectively can only ever be Error.self.

## Declaration

```swift
mutating func decodeErrorType() throws -> (any Any.Type)?
```

## Discussion

Discussion If the target known to not be throwing, or no error type was recorded, the method should return nil.
