Skip to content
This repository was archived by the owner on Jun 17, 2025. It is now read-only.
This repository was archived by the owner on Jun 17, 2025. It is now read-only.

Error: invalid json response body, if there is rate limits problem #18

@Amantel

Description

@Amantel

I get FetchError: invalid json response body at https://api.3commas.io/public/api/ver1/deals?account_id=*** reason: Unexpected token R in JSON at position 0
If I hit it to many times.

Code to replicate:

const run = async function run() {
  const arr = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];

  const results = await Promise.all(arr.map(async () => client.makeRequest('GET',
    '/public/api/ver1/deals?',
    { account_id: *** })));

  console.log(results);
};

run().catch((err) => { console.log('Caught error', err); });

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions