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
When reviewing a support issue related to the Gateway, I ended up reviewing the HTTP exector to find any context timeouts. It does have a timeout during the proxy to the function implementation, which is fine, but the processing of the error case from the HTTP client does not need the select statement it currently has.
Expected Behaviour
The client error check can be simplified because if the err is already not nil, then either context has already failed or some other error has occurred and we do not need to wait for the timeout. It should be equivalent to use this
This is in fact, more explicit and accurate, because it only checks for timeouts and ignores cancels, so the http response code is more accurate. According to the context docs, the context error can be DeadlineExceeded or Canceled, per https://golang.org/pkg/context/#pkg-variables. We either want to handle Canceled separately or treat it as a generic error.
Current Behaviour
When the client errors, we potentially wait for the context timeout, like this
When reviewing a support issue related to the Gateway, I ended up reviewing the HTTP exector to find any context timeouts. It does have a timeout during the proxy to the function implementation, which is fine, but the processing of the error case from the HTTP client does not need the
select
statement it currently has.Expected Behaviour
The client error check can be simplified because if the
err
is already notnil
, then either context has already failed or some other error has occurred and we do not need to wait for the timeout. It should be equivalent to use thisThis is in fact, more explicit and accurate, because it only checks for timeouts and ignores cancels, so the http response code is more accurate. According to the context docs, the context error can be
DeadlineExceeded
orCanceled
, per https://golang.org/pkg/context/#pkg-variables. We either want to handleCanceled
separately or treat it as a generic error.Current Behaviour
When the client errors, we potentially wait for the context timeout, like this
The text was updated successfully, but these errors were encountered: