Skip to content

Commit b1a96ed

Browse files
simonseyer1ec5
authored andcommitted
Improved default value when formatting the rate limit interval fails
Cherry-picked from ef5abb3.
1 parent 70b1727 commit b1a96ed

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

MapboxGeocoder/MBGeocoder.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@ public class Geocoder: NSObject {
292292
if let timeInterval = response.rateLimitInterval, let maximumCountOfRequests = response.rateLimit {
293293
let intervalFormatter = NSDateComponentsFormatter()
294294
intervalFormatter.unitsStyle = .Full
295-
let formattedInterval = intervalFormatter.stringFromTimeInterval(timeInterval) ?? "? minutes"
295+
let formattedInterval = intervalFormatter.stringFromTimeInterval(timeInterval) ?? "\(timeInterval) seconds"
296296
let formattedCount = NSNumberFormatter.localizedStringFromNumber(maximumCountOfRequests, numberStyle: .DecimalStyle)
297297
failureReason = "More than \(formattedCount) requests have been made with this access token within a period of \(formattedInterval)."
298298
}

0 commit comments

Comments
 (0)