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
|
||||
case .unexpectedStatus(413):
|
||||
return "HTTP 413: Payload Too Large"
|
||||
case .unexpectedStatus(429):
|
||||
return "HTTP 429: Rate Limit Exceeded"
|
||||
case .unexpectedStatus(let code):
|
||||
return "HTTP Code \(code)"
|
||||
case .invalidRequest:
|
||||
|
|
|
@ -85,6 +85,8 @@ fileprivate extension Pachyderm.Client.Error {
|
|||
switch type {
|
||||
case .networkError(_):
|
||||
return "wifi.exclamationmark"
|
||||
case .unexpectedStatus(429):
|
||||
return "clock.badge.exclamationmark"
|
||||
default:
|
||||
return "exclamationmark.triangle"
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue