node-jira icon indicating copy to clipboard operation
node-jira copied to clipboard

Adding the body to the error requests

Open henvic opened this issue 11 years ago • 9 comments

It'd be nice if node-jira returned the response body as well as the error even for errors as it makes finding bugs on projects that depend on it way easier.

I'm solving https://github.com/node-gh/gh-jira/issues/40 right now and it'd be really handy if we could access the error messages in a way like this, even to tell our users about what error happened so we can get better reports.

If you decide to merge these changes, please update the npm package as well :)

henvic avatar Mar 26 '14 20:03 henvic

+1

zenorocha avatar Mar 28 '14 18:03 zenorocha

+1

brunocoelho avatar Mar 28 '14 18:03 brunocoelho

about 90% of the tests fail, can you update to fix them? grunt test to run the tests.

tebriel avatar Mar 29 '14 14:03 tebriel

I've cloned the repo again and got the same error on the master branch here. I think it was not caused by my changes.

Can you verify? Monday I can have a look.

henvic at henvic-mp in ~/projects/nnn/node-jira (master)
$ grunt test
Running "jasmine_node:projectRoot" (jasmine_node) task

TypeError: Object #<Object> has no method 'options'
    at Object.<anonymous> (/Users/henvic/projects/nnn/node-jira/node_modules/grunt-jasmine-node/tasks/jasmine-node-task.js:13:26)
    at Object.<anonymous> (/Users/henvic/projects/nnn/node-jira/node_modules/grunt/lib/grunt/task.js:109:15)
    at Object.thisTask.fn (/Users/henvic/projects/nnn/node-jira/node_modules/grunt/lib/grunt/task.js:58:16)
    at Task.<anonymous> (/Users/henvic/projects/nnn/node-jira/node_modules/grunt/lib/util/task.js:343:36)
    at Task.<anonymous> (/Users/henvic/projects/nnn/node-jira/node_modules/grunt/lib/util/task.js:319:9)
    at Task.<anonymous> (/Users/henvic/projects/nnn/node-jira/node_modules/grunt/lib/util/task.js:346:11)
    at Task.<anonymous> (/Users/henvic/projects/nnn/node-jira/node_modules/grunt/lib/util/task.js:319:9)
    at Task.<anonymous> (/Users/henvic/projects/nnn/node-jira/node_modules/grunt/lib/util/task.js:346:11)
    at Task.start (/Users/henvic/projects/nnn/node-jira/node_modules/grunt/lib/util/task.js:359:5)
    at Object.grunt.tasks (/Users/henvic/projects/nnn/node-jira/node_modules/grunt/lib/grunt.js:143:8)

henvic avatar Mar 29 '14 17:03 henvic

Oh, huh, for some reason it was working, but after rm -rf node_modules/* && npm install it's no longer working. wonder what changed, will look into it.

tebriel avatar Mar 29 '14 17:03 tebriel

Yeah, grunt was way out of date and npm was loading a mix of libraries for grunt 0.3 and grunt 0.4. You can now npm install and see the tests failing.

tebriel avatar Mar 29 '14 18:03 tebriel

Any news here?

anton-rudeshko avatar May 16 '14 12:05 anton-rudeshko

I fixed the grunt issues, but still many tests failing, waiting on updated PR.

tebriel avatar May 16 '14 12:05 tebriel

@tebriel, I've updated my pull request. Take a look.

henvic avatar May 16 '14 15:05 henvic