Pebble App Framework: Phone API
    Preparing search index...

    Function failureReason

    • The words for why a read of a source failed, as the plugin runtime gave them, such as PERMISSION_DENIED. It is the text the framework's own reads give, for a plugin app that reads sources of its own and wants a refusal to read the same.

      The code wins, then the message. A blank one names nothing, and so does a numeric code of 0 or one that is not a finite number, so the message after it wins. A failure that names neither reads as NO_REASON rather than as the text of an object.

      Parameters

      • error: unknown

        What the read threw or rejected with, which may be anything.

      Returns string

      The reason, never empty.