featherbit UI
    Preparing search index...

    Function detailsFromMessage

    • Derives the inspectable payload from a toast's message line. The api client throws "<status>: <body>", which toasts show verbatim; here the body is pretty-printed when it is JSON so the panel shows the server's error structure legibly. Messages without a status prefix carry nothing beyond themselves, so they yield undefined (the panel falls back to the message).

      Parameters

      • message: string | undefined

      Returns string | undefined