question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error sending webhook to slack

See original GitHub issue

Issue

• Following the Github to Slack example • I am trying to send my own webhook request like this:

function postToSlack() {
  return rp({
        method: 'POST',
        uri: "https://hooks.slack.com/services/TEAM_ID/BOT_ID/API_KEY",
        body: { 
            channel: "#CHANNEL_NAME", 
            username: "webhookbot", 
            text: "MESSAGE"
        },
        json: true
    });
}

• I am getting this error

{
  "name": "RequestError",
  "message": "Error: getaddrinfo ENOTFOUND hooks.slack.com hooks.slack.com:443",
  "cause": {
    "code": "ENOTFOUND",
    "errno": "ENOTFOUND",
    "syscall": "getaddrinfo",
    "hostname": "hooks.slack.com",
    "host": "hooks.slack.com",
    "port": 443
  },
  "error": {
    "code": "ENOTFOUND",
    "errno": "ENOTFOUND",
    "syscall": "getaddrinfo",
    "hostname": "hooks.slack.com",
    "host": "hooks.slack.com",
    "port": 443
  }
}

• I tried to run the same function I am deploying in a my local node server and it works just fine

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

14reactions
rockwotjcommented, Mar 11, 2017

Are you on the free plan? The free plan cannot make external network requests. See more details here: https://firebase.google.com/pricing/ under bullet point 3

0reactions
aarontecommented, Mar 11, 2017

@nicolasgarnier no worries! that would save some people time debugging for sure!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Sending messages using Incoming Webhooks - Slack API
Incoming Webhooks are a simple way to post messages from apps into Slack. Creating an Incoming Webhook gives you a unique URL to...
Read more >
Incoming webhooks for Slack
Incoming webhooks are a simple way to share information from external sources with your workspace. How it works Send data to the channel...
Read more >
Outgoing Webhooks - Slack API
Outgoing Webhooks are a legacy method of sending notifications to an app about two specific activities: ... Because we strongly recommend you do...
Read more >
Error troubleshooting - Slack API
You're not logged in to a workspace. Use the command slack login to authenticate again. socket_connection_error. Couldn't connect to slack over websocket.
Read more >
Incoming Webhooks - Slack API
Incoming webhooks are a simple way to post messages from apps into Slack. Because we strongly recommend you do not use legacy custom...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found