GoogleCloudPlatform / GoogleCloudPlatform/esp-v2
Include Retry-After header
- Dominant language
- Go
- Stars
- 307
- Forks
- 185
- Avg merge
- 14h 45m
- Merged PRs (30d)
- 6
Description
When I add a quota to my OpenAPI document like
```yaml
x-google-management:
metrics:
- name: read-request-rate
displayName: Read Request Rate
valueType: INT64
metricKind: DELTA
quota:
limits:
- name: read-request-rate-limit
metric: read-request-rate
unit: '1/min/{project}'
values:
STANDARD: 10
paths:
"/echo":
post:
description: "Echo back a given message."
operationId: "echo"
produces:
- "application/json"
responses:
200:
description: "Echo"
schema:
$ref: "#/definitions/echoMessage"
parameters:
- description: "Message to echo"
in: body
name: message
required: true
schema:
$ref: "#/definitions/echoMessage"
x-google-quota:
metricCosts:
read-request-rate: 1
security:
- api_key: []
```
If a client exceeds the limit the response status code is the expected `429 Too Many Requests`, but sometimes if they wait a minute and make other request the response status code is `429` yet, could you include [Retry-After](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Retry-After) header when status code is `429`.
Contributor guide
Assessment
This issue has not been assessed yet.