Skip to content

Commit

Permalink
Add error handling Cryptocompare Http endpoint (#3626)
Browse files Browse the repository at this point in the history
* Add error handling Cryptocompare Http endpoint

* changeset

* Add POssible Solutions

* Add Error Handing to Cryptocompare EA

* Delete .changeset/red-shrimps-complain.md
  • Loading branch information
Subarna-Singh authored Jan 25, 2025
1 parent 094003f commit b81e24f
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/eight-crews-sell.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@chainlink/cryptocompare-adapter': patch
---

Add possible solutions to frequent errors
7 changes: 7 additions & 0 deletions packages/sources/cryptocompare/src/transport/crypto-ws.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,10 @@ export const wsTransport = new WebSocketTransport<WsEndpointTypes>({
parsed,
'You have connected with an invalid API key, IP address rate limits will now be applied. Please check if your key is correct',
)
logger.warn(`Possible Solutions:
1. Doublecheck your supplied credentials.
2. Contact Data Provider to ensure your subscription is active
3. If credentials are supplied under the node licensing agreement with Chainlink Labs, please contact us.`)
resolve()
} else {
logger.warn(parsed, 'Unexpected message after WS connection open')
Expand All @@ -109,6 +113,9 @@ export const wsTransport = new WebSocketTransport<WsEndpointTypes>({

if (message.TYPE === MessageTypes.SUB_VALIDATION_ERROR) {
logger.error(message, 'Assets are not supported by data provider')
logger.error(`Possible Solutions:
1. Confirm you are using the same symbol found in the job spec with the correct case.
2. There maybe an issue with the job spec or the Data Provider may have delisted the asset. Reach out to Chainlink Labs.`)
return []
}

Expand Down

0 comments on commit b81e24f

Please sign in to comment.