kernl API
    Preparing search index...

    Function appletMessageFailure

    • What an envelope says failed: its error string, or for a *.error envelope its message, its reason or its type. kehto's runtime answers a failed request with a *.result carrying error, so this covers its replies; kehto's own devtools read envelopes the same way.

      Parameters

      • message: unknown

        Any message an applet sent or received.

      Returns string | undefined

      The failure, or undefined when the message reports none.

      appletMessageFailure({ type: 'inc.channel.open.result', id: '1', error: 'target denied' }); // 'target denied'
      appletMessageFailure({ type: 'storage.get.result', id: '2', value: 'x' }); // undefined