Sorts what fetchText threw, what the runtime's fetch rejected with, or the error text
pluginRequest answered, into one of the FetchFailureKinds.
fetchText throws HTTP <status> for an answer that is not 2xx, which reads as HTTP and the
status. The Pebble app's own fetch rejects every failure as a TypeError whose message is
fetch failed:, fetch timeout:, or fetch abort: and the URL, with no TimeoutError or
AbortError name, so the message is read as well as the name. A timeout or an abort is TIMEOUT.
Its refusal of a site the wearer has not allowed is an Error named NotAllowedError, raised before
the request leaves, which is NOT_ALLOWED. Anything else is FAILED.
Text is read as pluginRequest's answer. http 429 in either case is HTTP and the status,
timeout is TIMEOUT, NETWORK_ERROR is NOT_ALLOWED, and any other text, FETCH_FAILED
included, is FAILED. The NETWORK_ERROR reading holds for pluginRequest alone.
Parameters
error: unknown
What was thrown or answered, which may be anything.
Sorts what
fetchTextthrew, what the runtime'sfetchrejected with, or the error textpluginRequestanswered, into one of theFetchFailureKinds.fetchTextthrowsHTTP <status>for an answer that is not 2xx, which reads asHTTPand the status. The Pebble app's own fetch rejects every failure as aTypeErrorwhose message isfetch failed:,fetch timeout:, orfetch abort:and the URL, with noTimeoutErrororAbortErrorname, so the message is read as well as the name. A timeout or an abort isTIMEOUT. Its refusal of a site the wearer has not allowed is anErrornamedNotAllowedError, raised before the request leaves, which isNOT_ALLOWED. Anything else isFAILED.Text is read as
pluginRequest's answer.http 429in either case isHTTPand the status,timeoutisTIMEOUT,NETWORK_ERRORisNOT_ALLOWED, and any other text,FETCH_FAILEDincluded, isFAILED. TheNETWORK_ERRORreading holds forpluginRequestalone.