Merge pull request #13449 from influxdata/error-429

chore(http): add 429 response to errors
pull/13437/head
Jade McGough 2019-04-17 22:12:34 -07:00 committed by GitHub
commit 1b50785fb6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 0 deletions

View File

@ -19,6 +19,7 @@ const (
EEmptyValue = "empty value"
EUnavailable = "unavailable"
EForbidden = "forbidden"
ETooManyRequests = "too many requests"
EUnauthorized = "unauthorized"
EMethodNotAllowed = "method not allowed"
)

View File

@ -117,6 +117,7 @@ var statusCodePlatformError = map[string]int{
platform.ENotFound: http.StatusNotFound,
platform.EUnavailable: http.StatusServiceUnavailable,
platform.EForbidden: http.StatusForbidden,
platform.ETooManyRequests: http.StatusTooManyRequests,
platform.EUnauthorized: http.StatusUnauthorized,
platform.EMethodNotAllowed: http.StatusMethodNotAllowed,
}

View File

@ -6157,6 +6157,7 @@ components:
- empty value
- unavailable
- forbidden
- too many requests
- unauthorized
- method not allowed
message: