-
Notifications
You must be signed in to change notification settings - Fork 3.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hubot - robot.http get method returns null body & res. Suspecting hubot timing out #1080
Comments
Following error is what I am getting as part of get method call... Error: socket hang up |
Anybody there for the help!!! |
The flow is like this,
Need your helpt o tweak the HUBOT so that it would wait for longer running scripts. Anything like timeout etc., at HUBOT end??? Your help is much appreciated!!! |
In general, it's important to do error handling when making http calls. There's not a timeout as far that's hubot specific. It sounds like a problem with the rest API. Are you able to use the /command endpoint from something that isn't hubot? |
@technicalpickles When I add the timeout like you suggested I get the following error:
|
@bostonaholic I would make sure you are able to use |
@technicalpickles I can. And the code works fine without the |
Hubo hear is invoking rest api (written node.js) which in turn returns the screenshot url post processing. Since the call would take few mins(3 mins max) hubot is timing out hence I am getting NULL body and res so I could not even check the status code or so.
How to fix the time out issue with hubot. Need your help at the earliest.
sample code,
robot.hear /(.*)command text/i, (res) ->
robot.http("http://localhost:9050/command")
.get() (err, res1, body) ->
res.reply "#{body}"
Here body is displaying as NULL in the rocket chat message. and suspecting the hubot's timeout. Your help is much appreciated...
Regards,
Ganesan S
The text was updated successfully, but these errors were encountered: