Skip to content

Commit 584c5ca

Browse files
committed
fix(servicenow): type upload-attachment response json to fix build typecheck
secureFetchWithValidation's response.json() resolves to unknown under the build's stricter typecheck; cast the parsed body so data.result is accessible.
1 parent 5beb971 commit 584c5ca

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • apps/sim/app/api/tools/servicenow/upload-attachment

apps/sim/app/api/tools/servicenow/upload-attachment/route.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ export const POST = withRouteHandler(async (request: NextRequest) => {
9797
return NextResponse.json({ success: false, error: errorMessage }, { status: response.status })
9898
}
9999

100-
const data = await response.json()
100+
const data = (await response.json()) as { result?: unknown }
101101

102102
logger.info(`[${requestId}] File attached to ServiceNow record successfully`, {
103103
tableName: body.tableName,

0 commit comments

Comments
 (0)