whatwg / whatwg/fetch

Keep track of errors so they can be exposed (if desired) in UX (and maybe API at some point)

Open
#352 5 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

topic: html
Dominant language
HTML
Stars
2.3k
Forks
403
Avg merge
21h 16m
Merged PRs (30d)
4

Description

https://fetch.spec.whatwg.org/#http-fetch 3.3 currently creates a generic network error. This means browsers display a generic error message if a navigation fails.

Ideally the browser should be able to display more relevant information like "bad certificate", "DNS failure", "You are offline", which I guess involves passing the error response back to the caller (navigation in this case).

@annevk suggests there are cases where this is a security issue, so a TODO is to find out what these are & when we can safely pass the error on.

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 by reading section 3.3 of the linked Fetch Standard and the surrounding discussion about generic network errors. Investigate which failure details could safely reach navigation or API callers, including the security concerns mentioned; done requires a defined safe propagation approach rather than only a generic error.

Written by the indexing model from the issue text.

Assessment

Domain
api, security, web-dev
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.