What Might Have Caused the PipedreamError Related to rawAccessToken() Method and How Can Better Debugging Info be Obtained?

This topic was automatically generated from Slack. You can find the original thread here.

Hi team, I got a PipedreamError with the following details - I have a feeling this is related to using the method rawAccessToken() due to the stack involving oauthTokens, but can someone help confirm what might have gone wrong? Is it possible to get better debugging info in the error message as well? We see this problem about every couple of weeks or so

"type": "PipedreamError",
"message": "Unable to connect. Is the computer able to access the url?",
"stack": "Error: Unable to connect. Is the computer able to access the url?
    at <anonymous> (/app/node_modules/@pipedream/sdk/dist/esm/api/resources/oauthTokens/client/Client.mjs:86:38)
    at fulfilled (/app/node_modules/@pipedream/sdk/dist/esm/api/resources/oauthTokens/client/Client.mjs:5:58)
    at processTicksAndRejections (native:7:39)",
"rawResponse": {
"headers": { 0 },
"redirected": false,
"status": 0,
"statusText": "Unknown Error",
"type": "error",
"url": ""
}

bump can i get help with this?

Sorry, what are you trying to do / when are you getting this error? Can you provide some more context?

Hi Danny, we are trying to get the access token to connect to the client and list tools. We have a plan to add retries but we also want to know if the root cause is internal to Pipedream / can be fixed because we see this issue every couple of weeks. Thanks!

I have no idea what your implementation looks like, but the core method in the SDK is working fine:

import { PipedreamClient } from "@pipedream/sdk";
 
const client = new PipedreamClient({
  projectEnvironment: PIPEDREAM_ENVIRONMENT,
  clientId: PIPEDREAM_CLIENT_ID,
  clientSecret: PIPEDREAM_CLIENT_SECRET,
  projectId: PIPEDREAM_PROJECT_ID
});
 
const accessToken = await client.rawAccessToken;
 
console.log(accessToken);

This error is from your LLM, not Pipedream:

"message": "Unable to connect. Is the computer able to access the url?",
"stack": "Error: Unable to connect. Is the computer able to access the url?

Posted thread to Discourse: What Causes the PipedreamError and How to Obtain Better Debugging Information?

Hi Danny, sorry for the delay coming back around to this. Our implementation looks similar. Why do you think it is from the LLM? The stack trace is pointing to the Pipedream SDK, and when I search the error message, I see various help articles related to OpenCode auth, which seems consistent with this being a .rawAccessToken failure. Would you be able to confirm if that is the root cause of this error, and if there is a fix or workaround?

Just to confirm on this thread, we’re discussing separately