
```swift
func updateLocation(_ location: Geo.Location) async {
    do {
        try await Amplify.Geo.updateLocation(location)
    } catch let error as Geo.Error {
        print("Failed to update location: \(error)")
    } catch {
        print("Unexpected error: \(error)")
    }
}
```