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

Ambiguous errors #6

Open
brokentone opened this issue Sep 1, 2015 · 4 comments
Open

Ambiguous errors #6

brokentone opened this issue Sep 1, 2015 · 4 comments

Comments

@brokentone
Copy link

Is there any way to log anything better here?

2015-09-01T03:34:54.621224+00:00 ip-10-90-30-37 cnnodejs-vogue-runway: {"time":"2015-09-01T03:32:34.710Z","name":"autopilot-vogue","hostname":"ip-10-90-30-37","pid":13233,"env":"production","message":"Not Found","stack":"HttpError: Not Found\n    at responseExecutor (/cn/runtime/vogue-runway/nodejs/releases/current/node_modules/copilot-js-sdk/node_modules/copilot-util/lib/http/response/index.js:25:16)\n    at tryCatcher (/cn/runtime/vogue-runway/nodejs/releases/current/node_modules/copilot-js-sdk/node_modules/copilot-util/node_modules/bluebird/js/main/util.js:24:31)\n    at Promise._resolveFromResolver (/cn/runtime/vogue-runway/nodejs/releases/current/node_modules/copilot-js-sdk/node_modules/copilot-util/node_modules/bluebird/js/main/promise.js:439:31)\n    at new Promise (/cn/runtime/vogue-runway/nodejs/releases/current/node_modules/copilot-js-sdk/node_modules/copilot-util/node_modules/bluebird/js/main/promise.js:53:37)\n    at onResponse (/cn/runtime/vogue-runway/nodejs/releases/current/node_modules/copilot-js-sdk/node_modules/copilot-util/lib/http/response/index.js:16:10)\n    at tryCatcher (/cn/runtime/vogue-runway/nodejs/releases/current/node_modules/copilot-js-sdk/node_modules/copilot-util/node_modules/bluebird/js/main/util.js:24:31)\n    at Promise._settlePromiseFromHandler (/cn/runtime/vogue-runway/nodejs/releases/current/node_modules/copilot-js-sdk/node_modules/copilot-util/node_modules/bluebird/js/main/promise.js:466:31)\n    at Promise._settlePromiseAt (/cn/runtime/vogue-runway/nodejs/releases/current/node_modules/copilot-js-sdk/node_modules/copilot-util/node_modules/bluebird/js/main/promise.js:545:18)\n    at Promise.b (domain.js:183:18)\n    at Async._drainQueue (/cn/runtime/vogue-runway/nodejs/releases/current/node_modules/copilot-js-sdk/node_modules/copilot-util/node_modules/bluebird/js/main/async.js:84:12)\n    at Async._drainQueues (/cn/runtime/vogue-runway/nodejs/releases/current/node_modules/copilot-js-sdk/node_modules/copilot-util/node_modules/bluebird/js/main/async.js:89:10)\n    at Async.drainQueues (/cn/runtime/vogue-runway/nodejs/releases/current/node_modules
2015-09-01T03:35:12.495891+00:00 ip-10-90-30-37 cnnodejs-vogue-runway: {"time":"2015-09-01T03:32:34.710Z","name":"autopilot-vogue","hostname":"ip-10-90-30-37","pid":13233,"env":"production","message":"Bad Request","stack":"HttpError: Bad Request\n    at responseExecutor (/cn/runtime/vogue-runway/nodejs/releases/current/node_modules/copilot-js-sdk/node_modules/copilot-util/lib/http/response/index.js:25:16)\n    at tryCatcher (/cn/runtime/vogue-runway/nodejs/releases/current/node_modules/copilot-js-sdk/node_modules/copilot-util/node_modules/bluebird/js/main/util.js:24:31)\n    at Promise._resolveFromResolver (/cn/runtime/vogue-runway/nodejs/releases/current/node_modules/copilot-js-sdk/node_modules/copilot-util/node_modules/bluebird/js/main/promise.js:439:31)\n    at new Promise (/cn/runtime/vogue-runway/nodejs/releases/current/node_modules/copilot-js-sdk/node_modules/copilot-util/node_modules/bluebird/js/main/promise.js:53:37)\n    at onResponse (/cn/runtime/vogue-runway/nodejs/releases/current/node_modules/copilot-js-sdk/node_modules/copilot-util/lib/http/response/index.js:16:10)\n    at tryCatcher (/cn/runtime/vogue-runway/nodejs/releases/current/node_modules/copilot-js-sdk/node_modules/copilot-util/node_modules/bluebird/js/main/util.js:24:31)\n    at Promise._settlePromiseFromHandler (/cn/runtime/vogue-runway/nodejs/releases/current/node_modules/copilot-js-sdk/node_modules/copilot-util/node_modules/bluebird/js/main/promise.js:466:31)\n    at Promise._settlePromiseAt (/cn/runtime/vogue-runway/nodejs/releases/current/node_modules/copilot-js-sdk/node_modules/copilot-util/node_modules/bluebird/js/main/promise.js:545:18)\n    at Promise.b (domain.js:183:18)\n    at Async._drainQueue (/cn/runtime/vogue-runway/nodejs/releases/current/node_modules/copilot-js-sdk/node_modules/copilot-util/node_modules/bluebird/js/main/async.js:84:12)\n    at Async._drainQueues (/cn/runtime/vogue-runway/nodejs/releases/current/node_modules/copilot-js-sdk/node_modules/copilot-util/node_modules/bluebird/js/main/async.js:89:10)\n    at Async.drainQueues (/cn/runtime/vogue-runway/nodejs/releases/current/node_mod
@pgoldrbx
Copy link
Contributor

pgoldrbx commented Sep 2, 2015

+1

1 similar comment
@gautamarora
Copy link

+1

@ericqweinstein
Copy link

@brokentone Could you provide more details? I haven't seen this before—the URI is always populated. If you could let me know which route you were trying to hit, I can try to reproduce.

@paulfryzel
Copy link
Contributor

Yeah, definitely any other information to go on here would be a huge help. There was a change made last October to include the request path on the SDK Error objects. I'm perfectly happy to modify or extend this output though if I can do anything to make the errors easier to understand.

Given those stack traces, the only way that particular outcome could manifest would be if no URL value existed for that HttpError instance. I'm currently looking into whether or not it's possible that the response object mutates such that it no longer contains the initial request data, which we use to set the URL property. OutgoingMessage.prototype.destroy (aka. response or socket destroy) doesn't modify that part (res.req -or- res.req.path), at least in Node 0.10.0 and 4.0.0. Is it possible that there was an older copilot-util version being pulled in somewhere along the way (double-checked and Vogue is at the latest, 2.2.1).

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

No branches or pull requests

5 participants