Conversation
| // retried by the client after a reasonable backoff. | ||
| // | ||
| // required: true | ||
| TemporaryField bool `json:"temporary"` |
There was a problem hiding this comment.
I'd inverse this and say "no_retry" because this error might not even make it to the caller if something else fails (e.g. internal cluster network error).
There was a problem hiding this comment.
No retry feels very weird, as you have to say NoRetry = false to specify it is retryable. But you want the default to be retry right?
There was a problem hiding this comment.
Yes, default should be retry for most 5xx errors (e.g. 502 bad gateway) and and some 4xx errors (e.g. 429 too many requests).
Usually, one would use the Retry-After to indicate when the retry can happen again. However, most of the infrastructure currently doesn't support setting this value correctly.
To disable retry explicitly, one could set Retry-After to a date far in the future, for example.
In summary, I don't think setting this as a JSON key is an appropriate fix as it is very application specific. We should probably work with default HTTP headers that are understood by most clients already.
For the console, we can narrow down the codes that need retry, e.g. 429, 503, 502, 500
|
OK, closing as this fix is too specific. |
Related Issue or Design Document
This feature allows to easily tell the client which errors it should retry and which need intervention.
Checklist
and signed the CLA.
introduces a new feature.
vulnerability. If this pull request addresses a security vulnerability, I
confirm that I got green light (please contact
security@ory.sh) from the maintainers to push
the changes.
works.
appropriate).
Further comments