Iskra API Reference
    Preparing search index...

    Function toProblem

    • Iskra's mapping of an error to a problem: an HttpError keeps its status, code and message; a Hono HTTPException its status and message; any other IskraError answers the status of its code (NOT_FOUND → 404, 500 for the rest) and shows its message only if marked expose; anything else is a 500 that shows nothing.

      Parameters

      • error: unknown
      • includeStack: boolean = false

      Returns Problem