Skip to content

Commit e96b847

Browse files
waleedlatif1claude
andcommitted
fix(confluence): reject empty update body for space PUT
Return 400 when neither name nor description is provided for space update, instead of sending an empty body to the Confluence API. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent f185b6b commit e96b847

File tree

1 file changed

+7
-0
lines changed
  • apps/sim/app/api/tools/confluence/space

1 file changed

+7
-0
lines changed

apps/sim/app/api/tools/confluence/space/route.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,13 @@ export async function PUT(request: NextRequest) {
197197

198198
const url = `https://api.atlassian.com/ex/confluence/${cloudId}/wiki/api/v2/spaces/${spaceId}`
199199

200+
if (!name && description === undefined) {
201+
return NextResponse.json(
202+
{ error: 'At least one of name or description is required for update' },
203+
{ status: 400 }
204+
)
205+
}
206+
200207
const updateBody: Record<string, unknown> = {}
201208
if (name) updateBody.name = name
202209
if (description !== undefined) {

0 commit comments

Comments
 (0)