Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for StatusTooManyRequests (0.1 sec)

  1. cmd/api-response.go

    // writeErrorResponse writes error headers
    func writeErrorResponse(ctx context.Context, w http.ResponseWriter, err APIError, reqURL *url.URL) {
    	switch err.HTTPStatusCode {
    	case http.StatusServiceUnavailable, http.StatusTooManyRequests:
    		// Set retry-after header to indicate user-agents to retry request after 60 seconds.
    		// https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Retry-After
    		w.Header().Set(xhttp.RetryAfter, "60")
    	}
    
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Thu Oct 31 19:27:06 UTC 2024
    - 33.4K bytes
    - Viewed (0)
  2. cmd/api-errors.go

    		HTTPStatusCode: 499, // No official code, use nginx value.
    	},
    	ErrTooManyRequests: {
    		Code:           "TooManyRequests",
    		Description:    "Please reduce your request rate",
    		HTTPStatusCode: http.StatusTooManyRequests,
    	},
    	ErrUnsupportedMetadata: {
    		Code:           "InvalidArgument",
    		Description:    "Your metadata headers are not supported.",
    		HTTPStatusCode: http.StatusBadRequest,
    	},
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Tue Oct 01 22:13:18 UTC 2024
    - 92.1K bytes
    - Viewed (0)
Back to top