MCPcopy Create free account
hub / github.com/TheThingsNetwork/lorawan-stack / isConnectionFailureError

Function isConnectionFailureError

pkg/webui/lib/errors/utils.js:254–257  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

252 * @returns {boolean} `true` if `error` is a connection failure error, `false` otherwise.
253 */
254export const isConnectionFailureError = error =>
255 isPlainObject(error) &&
256 hasValidDetails(error) &&
257 Boolean(error.details[0]?.name?.startsWith('503_upstream_reset_before_response_started'))
258
259/**
260 * Returns whether `error` is a backend error with ID: 'pkg/web/oauthclient:refused'.

Callers 2

createRequestLogicFunction · 0.90
toMessagePropsFunction · 0.85

Calls 1

hasValidDetailsFunction · 0.85

Tested by

no test coverage detected