Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add policy handler which handles API rate limits #210

Open
VMelnalksnis opened this issue Feb 3, 2024 · 0 comments
Open

Add policy handler which handles API rate limits #210

VMelnalksnis opened this issue Feb 3, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@VMelnalksnis
Copy link
Owner

Is your feature request related to a problem? Please describe.
The APIs have undocumented rate limits which are being hit during integration tests.

Describe the solution you'd like
The client contains retry policies which handles standard rate limiting.

Describe alternatives you've considered

Additional context
Example rate limited response:

{"summary":"Rate limit exceeded","detail":"The rate limit for this resource is 300/minute. Please try again in 20 seconds","status_code":429}
09:57:02 [INF] [System.Net.Http.HttpClient.Nordigen.ClientHandler] Sending HTTP request GET https://ob.nordigen.com/api/v2/requisitions/?limit=100&offset=0
09:57:02 [VRB] [System.Net.Http.HttpClient.Nordigen.ClientHandler] Request Headers:
User-Agent: VMelnalksnis.NordigenDotNet/1.0.0.0
Authorization: Bearer ********
09:57:02 [INF] [System.Net.Http.HttpClient.Nordigen.ClientHandler] Received HTTP response headers after 405.6839ms - 429
09:57:02 [VRB] [System.Net.Http.HttpClient.Nordigen.ClientHandler] Response Headers:
Date: Sat, 03 Feb 2024 07:57:41 GMT
Connection: keep-alive
Server: nginx
Vary: Accept, Accept-Language
X-C-UUID: 6ab1565a-81d2-4dcb-a899-c4150e3d55c6
X-U-UUID: 08027fea-7f3f-43fc-bee6-e2e68a844a59
X-Frame-Options: DENY
X-Content-Type-Options: nosniff
Referrer-Policy: same-origin
Content-Type: application/json
Content-Length: 141
Allow: GET, POST, HEAD, OPTIONS
Content-Language: en
09:57:02 [INF] [System.Net.Http.HttpClient.Nordigen.LogicalHandler] End processing HTTP request after 980.0212ms - 429
09:57:02 [VRB] [System.Net.Http.HttpClient.Nordigen.LogicalHandler] Response Headers:
Date: Sat, 03 Feb 2024 07:57:41 GMT
Connection: keep-alive
Server: nginx
Vary: Accept, Accept-Language
X-C-UUID: 6ab1565a-81d2-4dcb-a899-c4150e3d55c6
X-U-UUID: 08027fea-7f3f-43fc-bee6-e2e68a844a59
X-Frame-Options: DENY
X-Content-Type-Options: nosniff
Referrer-Policy: same-origin
Content-Type: application/json
Content-Length: 141
Allow: GET, POST, HEAD, OPTIONS
Content-Language: en
@VMelnalksnis VMelnalksnis added the enhancement New feature or request label Feb 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant