sveltejs / sveltejs/kit

invalidate() method timeout

Open
#6,274 7 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
20.8k
Forks
2.3k
Avg merge
1d 16h
Merged PRs (30d)
156

Description

Describe the problem

If invalidate() is called and the server generates an error, it appears the client is directed to an error page with the appropriate details. ✅

But if invalidate() is called and there is simply no response, then what? Right now it appears happy to wait forever (where "forever" is at least the 5 minutes I waited). This could lead to inconsistent state if not handled.

Should we be expected to add our own timeout mechanism or could a default timeout option be set or invalidate() allow a timeout parameter that could generate an error on the client?

Describe the proposed solution

Either a global timeout or a per-invalidate timeout, that will generate a timeout error on the client (or a combination of timeout and retry mechanism).

Alternatives considered

No response

Importance

would make my life easier

Additional Information

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the client-side invalidate() entry point and trace the no-response path alongside the existing server-error path. Decide whether the timeout is global or per call, add coverage for a request that never responds, and verify that the client reports a timeout instead of waiting indefinitely.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend, web-dev
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.