-
Notifications
You must be signed in to change notification settings - Fork 774
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Extend error handling of proxy request errors in ProxyWorker (#4867)
* ignore stale proxy errors * attempt to recover from ProxyWorker fetch errors by requeuing the request (only if it is GET or HEAD) * add test * add changeset * refactor to flatten nested if-else blocks * requeue request for retry at front of queue * sort batch of requests in queue by order of arrival * Revert "sort batch of requests in queue by order of arrival" This reverts commit 3329f19. * Revert "requeue request for retry at front of queue" This reverts commit f0377b7. * prioritise requests being retried over requests being proxied for the first time * better comments * update changeset to match recommeded format
- Loading branch information
Showing
3 changed files
with
133 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
--- | ||
"wrangler": patch | ||
--- | ||
|
||
fix: inflight requests to UserWorker which failed across reloads are now retried | ||
|
||
Previously, when running `wrangler dev`, requests inflight during a UserWorker reload (due to config or source file changes) would fail. | ||
|
||
Now, if those inflight requests are GET or HEAD requests, they will be reproxied against the new UserWorker. This adds to the guarantee that requests made during local development reach the latest worker. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters