---
title: "match(_:didFailWithError:)"
framework: gamekit
role: symbol
role_heading: Instance Method
path: "gamekit/gkmatchdelegate/match(_:didfailwitherror:)"
---

# match(_:didFailWithError:)

Handles the local player’s connection errors to a match.

## Declaration

```swift
optional func match(_ match: GKMatch, didFailWithError error: (any Error)?)
```

## Parameters

- `match`: The match in which the error occurs.
- `error`: The error that occurs.

## Discussion

Discussion GameKit calls this method when the local player can’t connect to any other players in the match.
