user-1
(User 1)
October 31, 2023, 5:52pm
1
This topic was automatically generated from Slack. You can find the original thread here .
I’m getting a connect ECONNREFUSED 127.0.0.1:80
error from axios in one workflow, but not in another. The requests are pretty much identical. Can I share development mode workflows with support?
user-1
(User 1)
October 31, 2023, 5:52pm
2
Hi , typically you’ll see this when you’re not passing a url
or passing a malformed URL in that section (e.g. just passing a path like /foo
vs. https://example.com/foo
. Can you check the value of the URL? If that doesn’t work, can you share the full code?
user-1
(User 1)
October 31, 2023, 5:52pm
3
const graphQuery = `
query Email_campaign_stats {
email_campaign_stats(
limit: 2,
offset: 0
) {
click_count
click_details
click_time
custom_email_message
custom_optional_email_message_1
custom_subject
email_campaign_id
email_campaign_seq_id
email_details
email_lead_map_id
got_reply
has_new_unread_email
id
ignore_reply
is_bounced
is_clicked
is_opened
is_sent
is_unsubscribed
latest_reply_time
ln_connection_request_status
message_id
open_count
open_time
reply_message_details
reply_time
sent_time
seq_variant_id
status
status_message
webhook_logs
}
}
`
console.log('graphQuery: ', graphQuery)
const graphRes = await axios($, {
url: 'https://gql.smartlead.ai/v1/graphql',
method: "POST",
headers: {
Authorization: `Bearer ${process.env.smartlead_graphql_access_token}`
},
data: {
query: graphQuery,
},
});
return;
user-1
(User 1)
October 31, 2023, 5:52pm
4
Interesting. Feel free to share your workflow and DM me your workflow URL. Do you mind if I test / modify that step if necessary?
user-1
(User 1)
October 31, 2023, 5:52pm
5
Do I need to be a workspace admin to update project settings?
user-1
(User 1)
October 31, 2023, 5:52pm
6
no, you shouldn’t need to be. Is the Update Project button not clickable for you when you check that box?
user-1
(User 1)
October 31, 2023, 5:52pm
8
if you refresh, is the project still shared with support?
user-1
(User 1)
October 31, 2023, 5:52pm
9
It’s unchecked if I refresh
user-1
(User 1)
October 31, 2023, 5:52pm
10
weird thanks, and checking again still fails? Let me see if I can repro on a new project and check with the team
user-1
(User 1)
October 31, 2023, 5:52pm
11
Okay, and checking it again still fails
user-1
(User 1)
October 31, 2023, 5:52pm
12
had you originally set up your project with GitHub sync via the OAuth option or via Deploy Key?
user-1
(User 1)
October 31, 2023, 5:52pm
14
what axios
import do you have in this code step?
user-1
(User 1)
October 31, 2023, 5:52pm
15
Here’s a full step I put in another test workflow that gets the same error:
// To use any npm package, just import it
import axios from "axios";
export default defineComponent({
props: {
graphqlEndpoint: {
type: "string",
label: "GraphQL Endpoint",
},
},
async run({ steps, $ }) {
// Get Smartlead email_campaign_leads_mappings
const graphQuery = `
query Email_campaign_stats {
email_campaign_stats(
limit: 2,
offset: 0
) {
click_count
click_details
click_time
custom_email_message
custom_optional_email_message_1
custom_subject
email_campaign_id
email_campaign_seq_id
email_details
email_lead_map_id
got_reply
has_new_unread_email
id
ignore_reply
is_bounced
is_clicked
is_opened
is_sent
is_unsubscribed
latest_reply_time
ln_connection_request_status
message_id
open_count
open_time
reply_message_details
reply_time
sent_time
seq_variant_id
status
status_message
webhook_logs
}
}
`
console.log('graphQuery: ', graphQuery)
const graphRes = await axios($, {
url: this.graphqlEndpoint,
method: "POST",
headers: {
Authorization: `Bearer ${process.env.smartlead_graphql_access_token}`
},
data: {
query: graphQuery,
},
});
return;
},
})
I think the issue could be with that smartlead hostname I’m pulling from.
user-1
(User 1)
October 31, 2023, 5:52pm
16
Thanks. Standard axios
doesn’t support the $
as the first argument, that’s specific to @pipedream/platform axios
. Try replacing the import to use ours and it should work: @pipedream/platform axios
user-1
(User 1)
October 31, 2023, 5:52pm
17
import { axios } from "@pipedream/platform"
1 Like
user-1
(User 1)
October 31, 2023, 5:52pm
19
cool glad to hear that worked
user-1
(User 1)
October 31, 2023, 5:52pm
20
could you also refresh pipedream.com whenever you have a moment and see if checking the support box on your project settings lets you save that change now?