Creative Analyzer - v0.0.1
    Preparing search index...

    Function mapErrorToResponse

    • Map an internal error to a user-safe HTTP response.

      Routes by error class:

      Always logs the raw error to console.warn/console.error so the original detail remains accessible via wrangler tail.

      Parameters

      • err: unknown

        The thrown value (unknown shape).

      Returns Response

      A Response with the right status and a one-sentence error body.