Skip to content

Commit 5d32d97

Browse files
Potential fix for pull request finding 'CodeQL / Information exposure through a stack trace'
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> Signed-off-by: Dargon789 <64915515+Dargon789@users.noreply.github.com>
1 parent 9a983ba commit 5d32d97

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

apps/web/functions/api/image/positions.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ export async function positionImageHandler(c: Context) {
3232
versionBadge: data.poolData?.protocolVersion,
3333
})
3434
} catch (error: unknown) {
35-
const message = error instanceof Error ? error.message : String(error)
36-
return new Response(message, { status: 500 })
35+
console.error('positionImageHandler failed', error)
36+
return new Response('Internal server error.', { status: 500 })
3737
}
3838
}

0 commit comments

Comments
 (0)