Skip to content

not showing error when password is incorrect #372

@ntalamdotcom

Description

@ntalamdotcom

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' });
}
}``

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions