Fetch Client API Documentation - v1.1.1
    Preparing search index...

    Variable HTTP_STATUSConst Readonly

    HTTP_STATUS: {
        NO_CONTENT: 204;
        NOT_MODIFIED: 304;
        REQUEST_TIMEOUT: 408;
        TOO_MANY_REQUESTS: 429;
        INTERNAL_SERVER_ERROR: 500;
        BAD_GATEWAY: 502;
        SERVICE_UNAVAILABLE: 503;
        GATEWAY_TIMEOUT: 504;
    } = ...

    HTTP status codes for different response scenarios

    Type Declaration

    • ReadonlyNO_CONTENT: 204

      No Content - successful request with no response body

    • ReadonlyNOT_MODIFIED: 304

      Not Modified - cached version is still valid

    • ReadonlyREQUEST_TIMEOUT: 408

      Request Timeout - server didn't receive complete request

    • ReadonlyTOO_MANY_REQUESTS: 429

      Too Many Requests - rate limiting in effect

    • ReadonlyINTERNAL_SERVER_ERROR: 500

      Internal Server Error - generic server error

    • ReadonlyBAD_GATEWAY: 502

      Bad Gateway - invalid response from upstream server

    • ReadonlySERVICE_UNAVAILABLE: 503

      Service Unavailable - server temporarily overloaded

    • ReadonlyGATEWAY_TIMEOUT: 504

      Gateway Timeout - upstream server didn't respond

    Common HTTP status codes used throughout the client for response handling and error detection.

    // Check for empty response
    if (response.status === HTTP_STATUS.NO_CONTENT) {
    return undefined;
    }

    // Handle rate limiting
    if (response.status === HTTP_STATUS.TOO_MANY_REQUESTS) {
    // Implement backoff strategy
    }