Auth0 Universal Components
    Preparing search index...

    Function getStatusCode

    • Extracts the HTTP status code from an unknown error object.

      This function checks multiple common locations where status codes may be stored:

      • error.status
      • error.statusCode
      • error.response.status
      • error.body.status

      Parameters

      • error: unknown

        The unknown error to extract the status code from

      Returns number | undefined

      The HTTP status code if found, otherwise undefined