Skip to content
New issue

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

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

Already on GitHub? # to your account

Intermittent Connection Error on API after Multiple Page Reloads #451

Open
OnurUenal opened this issue Jun 14, 2024 · 1 comment
Open

Intermittent Connection Error on API after Multiple Page Reloads #451

OnurUenal opened this issue Jun 14, 2024 · 1 comment

Comments

@OnurUenal
Copy link

Description

I am encountering an intermittent connection error when interacting with the API. This error appears especially after reloading the page multiple times in quick succession. It seems related to potential rate limiting or token management issues.

Steps to Reproduce

  1. Load the page and successfully make an API call.
  2. Reload the page multiple times rapidly.
  3. Observe that the error message appears after several reloads.

Expected Behavior

The API should handle rapid reloads gracefully, possibly with managed retry logic or better error handling.

Actual Behavior

An error message appears, suggesting a failure in connection or rate limiting being exceeded.

Additional Information

  • Error message:
Subscribing to transactions...
[Nest] 64188  - 06/14/2024, 8:02:34 PM     LOG [NestApplication] Nest application successfully started +70ms
refreshToken <!--token-->

/Users/onurunal/Projekte/Lernen/entruempelung/entruempelung-be/node_modules/popsicle-transport-http/src/index.ts:604
        new ConnectionError(req, `Unable to connect to ${url.host}`, err)
        ^
ConnectionError: Unable to connect to api.kontist.com
    at ClientHttp2Stream.onRequestError (/Users/onurunal/Projekte/Lernen/entruempelung/entruempelung-be/node_modules/popsicle-transport-http/src/index.ts:604:9)
    at Object.onceWrapper (node:events:628:26)
    at ClientHttp2Stream.emit (node:events:525:35)
    at emitErrorNT (node:internal/streams/destroy:157:8)
    at emitErrorCloseNT (node:internal/streams/destroy:122:3)
    at processTicksAndRejections (node:internal/process/task_queues:83:21)
  • Frequency: Occurs after 3-4 rapid reloads.

Has anyone else encountered this intermittent connection issue, or can someone suggest further steps to troubleshoot or resolve this behavior? Any insights or guidance would be greatly appreciated.

@OgulcanCelik
Copy link
Contributor

Hello @OnurUenal, can you please share more details on how you use our API and error logs? There is a rate-limiting in place of course, and ideally, you should be using subscriptions instead of refreshing your application to send a heavy amount of concurrent requests.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants