-
Notifications
You must be signed in to change notification settings - Fork 167
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: gateway get durable object request function #1264
Conversation
Deploying with Cloudflare Pages
|
e8f920a
to
f9735b5
Compare
ddae244
to
30a6a16
Compare
30a6a16
to
2e6d60b
Compare
if (controller.signal.aborted) { | ||
return { | ||
url: gwUrl, | ||
aborted: true, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we please be specific that this is a timeout (timeout: true
), or have aborted + reason
- where reason is timeout.
We could maybe roll requestPreventedCode
into this:
{
url: gwUrl,
aborted: true,
reason: REQUEST_PREVENTED_RATE_LIMIT_CODE
}
And for timeout:
{
url: gwUrl,
aborted: true,
reason: 'TIMEOUT'
}
...for all other successful you set aborted: false
.
Just trying to get a standard return type out of this.
packages/gateway/src/gateway.js
Outdated
@@ -288,6 +296,10 @@ async function updateGatewayMetrics( | |||
gwResponse, | |||
isWinner = false | |||
) { | |||
if (!gwResponse.response?.status && !gwResponse.requestPreventedCode) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be checking aborted
instead?
7bd69a5
to
dcc29ba
Compare
* 'main' of github.com:nftstorage/nft.storage: fix: gateway get durable object request function (#1264)
Fixes two minor issues: