You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We need a mechanism for signaling to the client when gateway has a cached failure, and when it is ok to retry.
The initial use will be filecoin-saturn/caboose#44 but this will be useful beyond that – in the future, gateway operators will be able to write custom throttling logic, and this error will take care of HTTP semantics.
in go-libipfs/gateway: add special handling of gateway.ErrGatewayRetryAfter in the handler.go#L565-L578, so it produces HTTP 429 response and if ErrGatewayRetryAfter.RetryAfter attribute is set to value >0 set the header on the response.
We need a mechanism for signaling to the client when gateway has a cached failure, and when it is ok to retry.
The initial use will be filecoin-saturn/caboose#44 but this will be useful beyond that – in the future, gateway operators will be able to write custom throttling logic, and this error will take care of HTTP semantics.
I propose we:
gateway.ErrGatewayRetryAfter
in the handler.go#L565-L578, so it produces HTTP 429 response and ifErrGatewayRetryAfter.RetryAfter
attribute is set to value>0
set the header on the response.The text was updated successfully, but these errors were encountered: