tkhq / sdk

Turnkey TypeScript SDK
Apache License 2.0
51 stars 14 forks source link

Proxy does not give descriptive errors #366

Open sosoxuc opened 1 month ago

sosoxuc commented 1 month ago

When I am trying to use proxy the server gives back error:

Screenshot 2024-09-13 at 3 10 11 PM

When I switch to remote api (api.turnkey.com) works fine

How should one guess what's wrong?

r-n-o commented 1 month ago

@sosoxuc this looks like a POST to the wrong host. I was able to repro with:

curl -X POST https://www.turnkey.com/public/v1/query/list_wallets
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Error</title>
</head>
<body>
<pre>Cannot POST /public/v1/query/list_wallets</pre>
</body>
</html>

The correct host to use to call our API endpoints is api.turnkey.com, not www.turnkey.com. Hope that helps!