Skip to content

Commit

Permalink
Update StravaClient.swift
Browse files Browse the repository at this point in the history
  • Loading branch information
FleetPhil authored Nov 6, 2020
1 parent b6a5f42 commit 82a6ca9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Sources/StravaSwift/StravaClient.swift
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ extension StravaClient {
fileprivate func generateError(failureReason: String, response: HTTPURLResponse?) -> NSError {
let errorDomain = "com.stravaswift.error"
var userInfo = [NSLocalizedFailureReasonErrorKey: failureReason]
userInfo[NSURLErrorKey] = response?.url.absoluteString ?? "URL Unavailable"
userInfo[NSURLErrorKey] = response?.url?.absoluteString ?? "URL Unavailable"
let code = response?.statusCode ?? 0
let returnError = NSError(domain: errorDomain, code: code, userInfo: userInfo)

Expand Down

0 comments on commit 82a6ca9

Please sign in to comment.