Stratal API Reference
    Preparing search index...

    Function getHttpStatus

    • Maps error codes to HTTP status codes

      This utility is used by the frontend to set appropriate HTTP status codes when returning errors from API routes.

      Parameters

      • code: number

        Numeric error code from ERROR_CODES registry

      Returns ContentfulStatusCode

      HTTP status code (200-599)