error static method
The error() static method of the Response interface returns a new
Response object associated with a network error.
This is mainly useful when writing service workers: it enables a service
worker to send a response from a ServiceWorkerGlobalScope.fetch_event
event handler that will cause the fetch call in the main app code to
reject the promise.
An error response has its Response.type set to error.
Implementation
external static Response error();