Skip to content

Add rate limit name in HTTP error exception

Nailia Iskhakova requested to merge 550-print-rate-limit-if-exists into main

Adding rate limit name header to the HTTP error exception. Expand error logging output to also include headers for better debugging.

Example error output:

GPT Data Generator v1.1.0 - opinionated test data for the GitLab Performance Tool
Checking that GitLab environment 'http://xxxx' is available, supported and that provided Access Token works...
Environment and Access Token check complete - URL: http://xxx, Version: 15.3.5-ee 96db1338fc6

GPT data generation failed:
GPTCommon::RequestError - GET request failed!
Code: 429
Response: Retry later

Correlation ID: 01GKVN44WQSREYAFCAPQ7J7G6Q
Rate Limit error caused by 'throttle_authenticated_api' limit

 Traceback:["/performance/lib/gpt_common.rb:45:in `make_http_request'", "/performance/lib/gpt_test_data.rb:207:in `check_users_with_group_name'", "bin/generate-gpt-data:149:in `<main>'"]

Closes #550 (closed)

Merge request reports