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

not showing error when password is incorrect

Open ntalamdotcom opened this issue 1 year ago • 0 comments

When executing this code I could not get the error if the password is wrong: export default async function getLatestProjectIssue(req: NextApiRequest, res: NextApiResponse) { try { const jira = new JiraClient({ // protocol: 'https', host: process.env.JIRA_HOST as string, username: process.env.JIRA_EMAIL, password: process.env.JIRA_API_TOKEN, apiVersion: process.env.JIRA_API_VERSION, strictSSL: true }); var projectKey = "SCRUM" const issues = await jira.searchJira( project=${projectKey} ORDER BY updated DESC, { maxResults: 1, // Only fetch the latest issue fields: ['summary', 'updated', 'status', 'assignee'], } ); res.status(200).json(issues); } catch (error) { res.status(500).json({ error: 'Failed to fetch Jira projects' }); } }``

ntalamdotcom avatar Sep 11 '24 14:09 ntalamdotcom