• Safely checks if an error is an HTTP error with a specific status code.

    Parameters

    • error: unknown

      The error to check

    • statusCode: number

      The status code to check for

    Returns boolean

    True if the error has the specified status code