Skip to content

Commit 99c44e9

Browse files
authored
fix(jira-backend): fix incorrect 404 response (#289)
1 parent bf2a579 commit 99c44e9

2 files changed

Lines changed: 9 additions & 4 deletions

File tree

.changeset/great-carrots-travel.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@axis-backstage/plugin-jira-dashboard-backend': patch
3+
---
4+
5+
Fix incorrect 404 response

plugins/jira-dashboard-backend/src/service/router.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -143,11 +143,11 @@ export async function createRouter(
143143
logger.error(
144144
`Could not find Jira project ${project.fullProjectKey}: ${err.message}`,
145145
);
146+
response.status(404).json({
147+
error: `Jira project not found with key ${project.fullProjectKey}`,
148+
});
149+
return;
146150
}
147-
response.status(404).json({
148-
error: `No Jira project found with key ${projects[0].projectKey}`,
149-
});
150-
return;
151151
}
152152

153153
let userEntity: UserEntity | undefined;

0 commit comments

Comments
 (0)