jira-node / node-jira-client

A Node.js wrapper for the Jira REST API
https://jira-node.github.io/
MIT License
449 stars 168 forks source link

Error object thrown by an incomplete request doesn't have relevant information #356

Closed sreenaths closed 1 year ago

sreenaths commented 1 year ago

In the latest version 8.2.0, an incomplete request results in error without relevant information.

For instance I tried calling addNewIssue without passing an issuetype. Earlier this type of request was failing with an error that said "issue type is required". But now, following is the error object that I received.

[start:server] Error: [object Object]
[start:server]     at JiraApi.doRequest (/Users/ssomarajapuram/src/github/smart-ci/node_modules/jira-client/lib/jira.js:347:13
[start:server]     at processTicksAndRejections (node:internal/process/task_queues:96:5)

Reverting to 8.0.0 resolved the issue. It returns the required info, but in exchange it doesn't throw an error now.

Seth10001 commented 1 year ago

Hi @sreenaths!

This was fixed in #353, but I haven't deployed it yet. I'll make a new release for it.

Seth10001 commented 1 year ago

This should be fixed in 8.2.1, so I will close for now. Let me know if you are still seeing the issue