<!--
{
  "availability" : [
    "iOS: 4.1.0 -",
    "iPadOS: 4.1.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.8.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "GameKit",
  "identifier" : "/documentation/GameKit/GKMatchDelegate/match(_:didFailWithError:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "GameKit"
    ],
    "preciseIdentifier" : "c:objc(pl)GKMatchDelegate(im)match:didFailWithError:"
  },
  "title" : "match(_:didFailWithError:)"
}
-->

# match(_:didFailWithError:)

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

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

## Parameters

`match`

The match in which the error occurs.

`error`

The error that occurs.

## Discussion

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

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)