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

not showing error when password is incorrect #372

Open
ntalamdotcom opened this issue Sep 11, 2024 · 0 comments
Open

not showing error when password is incorrect #372

ntalamdotcom opened this issue Sep 11, 2024 · 0 comments

Comments

@ntalamdotcom
Copy link

ntalamdotcom commented Sep 11, 2024

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

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

1 participant