Skip to content

Commit bdf3ce3

Browse files
waleedlatif1claude
andcommitted
fix: address PR review comments from Bugbot
- Remove debug logger.info for formAnswers in JSM request route - Restore user-friendly spaceId error message in Confluence create-page route - Restore details field in Jira write and update route error responses Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent a71a23d commit bdf3ce3

File tree

4 files changed

+13
-12
lines changed

4 files changed

+13
-12
lines changed

apps/sim/app/api/tools/confluence/create-page/route.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -108,10 +108,11 @@ export async function POST(request: NextRequest) {
108108
statusText: response.statusText,
109109
error: errorText,
110110
})
111-
return NextResponse.json(
112-
{ error: parseAtlassianErrorMessage(response.status, response.statusText, errorText) },
113-
{ status: response.status }
114-
)
111+
let errorMessage = parseAtlassianErrorMessage(response.status, response.statusText, errorText)
112+
if (errorMessage.includes("'spaceId'") && errorMessage.includes('Long')) {
113+
errorMessage = 'Invalid Space ID. Use the list spaces operation to find valid space IDs.'
114+
}
115+
return NextResponse.json({ error: errorMessage }, { status: response.status })
115116
}
116117

117118
const data = await response.json()

apps/sim/app/api/tools/jira/update/route.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,10 @@ export async function PUT(request: NextRequest) {
188188
})
189189

190190
return NextResponse.json(
191-
{ error: parseAtlassianErrorMessage(response.status, response.statusText, errorText) },
191+
{
192+
error: parseAtlassianErrorMessage(response.status, response.statusText, errorText),
193+
details: errorText,
194+
},
192195
{ status: response.status }
193196
)
194197
}

apps/sim/app/api/tools/jira/write/route.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,10 @@ export async function POST(request: NextRequest) {
197197
})
198198

199199
return NextResponse.json(
200-
{ error: parseAtlassianErrorMessage(response.status, response.statusText, errorText) },
200+
{
201+
error: parseAtlassianErrorMessage(response.status, response.statusText, errorText),
202+
details: errorText,
203+
},
201204
{ status: response.status }
202205
)
203206
}

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

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -76,12 +76,6 @@ export async function POST(request: NextRequest) {
7676
const url = `${baseUrl}/request`
7777

7878
logger.info('Creating request at:', { url, serviceDeskId, requestTypeId })
79-
logger.info('Raw formAnswers param:', {
80-
formAnswers,
81-
type: typeof formAnswers,
82-
isObject: typeof formAnswers === 'object',
83-
keys: formAnswers && typeof formAnswers === 'object' ? Object.keys(formAnswers) : null,
84-
})
8579

8680
const requestBody: Record<string, unknown> = {
8781
serviceDeskId,

0 commit comments

Comments
 (0)