Merge pull request #13449 from influxdata/error-429
chore(http): add 429 response to errorspull/13437/head
commit
1b50785fb6
|
@ -19,6 +19,7 @@ const (
|
||||||
EEmptyValue = "empty value"
|
EEmptyValue = "empty value"
|
||||||
EUnavailable = "unavailable"
|
EUnavailable = "unavailable"
|
||||||
EForbidden = "forbidden"
|
EForbidden = "forbidden"
|
||||||
|
ETooManyRequests = "too many requests"
|
||||||
EUnauthorized = "unauthorized"
|
EUnauthorized = "unauthorized"
|
||||||
EMethodNotAllowed = "method not allowed"
|
EMethodNotAllowed = "method not allowed"
|
||||||
)
|
)
|
||||||
|
|
|
@ -117,6 +117,7 @@ var statusCodePlatformError = map[string]int{
|
||||||
platform.ENotFound: http.StatusNotFound,
|
platform.ENotFound: http.StatusNotFound,
|
||||||
platform.EUnavailable: http.StatusServiceUnavailable,
|
platform.EUnavailable: http.StatusServiceUnavailable,
|
||||||
platform.EForbidden: http.StatusForbidden,
|
platform.EForbidden: http.StatusForbidden,
|
||||||
|
platform.ETooManyRequests: http.StatusTooManyRequests,
|
||||||
platform.EUnauthorized: http.StatusUnauthorized,
|
platform.EUnauthorized: http.StatusUnauthorized,
|
||||||
platform.EMethodNotAllowed: http.StatusMethodNotAllowed,
|
platform.EMethodNotAllowed: http.StatusMethodNotAllowed,
|
||||||
}
|
}
|
||||||
|
|
|
@ -6157,6 +6157,7 @@ components:
|
||||||
- empty value
|
- empty value
|
||||||
- unavailable
|
- unavailable
|
||||||
- forbidden
|
- forbidden
|
||||||
|
- too many requests
|
||||||
- unauthorized
|
- unauthorized
|
||||||
- method not allowed
|
- method not allowed
|
||||||
message:
|
message:
|
||||||
|
|
Loading…
Reference in New Issue