Skip to content

Commit 02fca0e

Browse files
waleedlatif1claude
andcommitted
fix(jsm): explicit 400 when deprecated emails param is sent
Address greptile review on PR #4345: instead of silently dropping `emails` and falling through to list-customers, return a 400 telling the caller to use `accountIds`. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
1 parent 660fc69 commit 02fca0e

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

  • apps/sim/app/api/tools/jsm/customers

apps/sim/app/api/tools/jsm/customers/route.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,16 @@ export const POST = withRouteHandler(async (request: NextRequest) => {
4545
return NextResponse.json({ error: 'Service Desk ID is required' }, { status: 400 })
4646
}
4747

48+
if (body.emails !== undefined) {
49+
return NextResponse.json(
50+
{
51+
error:
52+
'The `emails` parameter is no longer supported. Use `accountIds` (Atlassian account IDs) instead.',
53+
},
54+
{ status: 400 }
55+
)
56+
}
57+
4858
const cloudId = cloudIdParam || (await getJiraCloudId(domain, accessToken))
4959

5060
const cloudIdValidation = validateJiraCloudId(cloudId, 'cloudId')

0 commit comments

Comments
 (0)