kernl API
    Preparing search index...

    Function resourceErrorFor

    • The NAP-RESOURCE error a bridge failure becomes. The bridges reject with prefixed reasons; kehto's resource service reports any error that is not a ResourceServiceError as network-error, so without this an applet could not tell a missing blob or an unsupported scheme from a dead network (D-055).

      Parameters

      • error: unknown

        What the bridge registry rejected with.

      Returns ResourceServiceError

      The error to throw to the resource service, carrying the bridge's reason as its message.

      resourceErrorFor(new Error('unavailable:not-found')).code; // 'not-found'
      resourceErrorFor(new Error('unavailable:network Failed to fetch')).code; // 'network-error'