Improve rate limit exceeded error message
This commit is contained in:
parent
bac272a2db
commit
f13874ee01
|
@ -508,6 +508,8 @@ extension Client {
|
||||||
// todo: support more status codes
|
// todo: support more status codes
|
||||||
case .unexpectedStatus(413):
|
case .unexpectedStatus(413):
|
||||||
return "HTTP 413: Payload Too Large"
|
return "HTTP 413: Payload Too Large"
|
||||||
|
case .unexpectedStatus(429):
|
||||||
|
return "HTTP 429: Rate Limit Exceeded"
|
||||||
case .unexpectedStatus(let code):
|
case .unexpectedStatus(let code):
|
||||||
return "HTTP Code \(code)"
|
return "HTTP Code \(code)"
|
||||||
case .invalidRequest:
|
case .invalidRequest:
|
||||||
|
|
|
@ -85,6 +85,8 @@ fileprivate extension Pachyderm.Client.Error {
|
||||||
switch type {
|
switch type {
|
||||||
case .networkError(_):
|
case .networkError(_):
|
||||||
return "wifi.exclamationmark"
|
return "wifi.exclamationmark"
|
||||||
|
case .unexpectedStatus(429):
|
||||||
|
return "clock.badge.exclamationmark"
|
||||||
default:
|
default:
|
||||||
return "exclamationmark.triangle"
|
return "exclamationmark.triangle"
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue