Skip to content

Error messages for candlestick data not in sync with the latest Crypto.com documentation #1

@tomerlir

Description

@tomerlir

Subject of the issue

When fetching candlestick data using the node-crypto-com library, I noticed that the error messages provided by the library don't align with the latest documentation from Crypto.com. This discrepancy makes it challenging to debug issues with the candlesticks.

Steps to reproduce

  1. Ensure you're using the node-crypto-com library
  2. Initialize a new Node.js project and install the library using npm install node-crypto-com
  3. Set up your API keys and other required configuration for the node-crypto-com library
  4. Create a function to fetch candlestick data for the DOGE_USDT trading pair with a 1m interval. You can use the getCandlesticks function
  5. Add a console log statement to output the candlestick data or any errors received
  6. Execute the function and let it run multiple times
  7. Instead of receiving expected error messages as per Crypto.com documentation, you will observe discrepancies in the error messages every so often

Expected behaviour

Error messages that align with the Crypto.com documentation, helping in efficient debugging.

Actual behaviour

Received error messages that don't match the official documentation. For example:

error data { code: 10001, message: 'SYS_ERROR' }
Error occurred in getCandlesticks: Unexpected API response structure
Error occurred in main: Unexpected API response structure
/home/runner/Crypto/index.js:35
      throw new Error('Unexpected API response structure');
            ^

Error: Unexpected API response structure
    at getCandlesticks (/home/runner/Crypto/index.js:35:13)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

Node.js v18.12.1
repl process died unexpectedly: exit status 1

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