Skip to content
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

Add checks of HTTP response code #5

Open
radeksimko opened this issue Jun 9, 2016 · 0 comments
Open

Add checks of HTTP response code #5

radeksimko opened this issue Jun 9, 2016 · 0 comments

Comments

@radeksimko
Copy link

The pugme service is currently down, which causes the pug commands to be ignored from user's point of view.

In reality an error is raised:

[Thu Jun 09 2016 18:36:55 GMT+0000 (UTC)] ERROR SyntaxError: Unexpected token <
 at Object.parse (native)
 at /workdir/node_modules/hubot-pugme/src/pugme.coffee:19:9, <js>:5:30
 at IncomingMessage.<anonymous> (/workdir/node_modules/scoped-http-client/src/index.js:95:22)
 at emitNone (events.js:72:20)
 at IncomingMessage.emit (events.js:166:7)
 at endReadableNT (_stream_readable.js:905:12)
 at doNTCallback2 (node.js:452:9)
 at process._tickDomainCallback (node.js:407:17)

I believe there can be some simple http response code checks (probably code != 200) in place to make hubot return a reasonably nice error message to the user.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant