Web APIs
Response.error()
Constructs a response representing a network error, with type error, status zero and no body. This does not perform a network request.
Formal Syntax & Structure
javascript syntaxjavascript
Response.error()Return Value
Response
Error response object.
Working Example
Example Snippetjavascript
const r=Response.error(); console.log(r.type,r.status,r.ok,r.body===null);