mirror of
https://github.com/kjanat/livedash-node.git
synced 2026-01-16 10:12:09 +01:00
Potential fix for code scanning alert no. 6: Information exposure through a stack trace
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
This commit is contained in:
@ -209,14 +209,17 @@ export default {
|
||||
});
|
||||
|
||||
} catch (error) {
|
||||
console.error('Worker error:', error);
|
||||
return new Response(JSON.stringify(formatError(error)), {
|
||||
console.error('Worker error:', error); // Log full error details, including stack trace
|
||||
return new Response(
|
||||
JSON.stringify({ message: 'An internal server error occurred. Please try again later.' }),
|
||||
{
|
||||
status: 500,
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
'Access-Control-Allow-Origin': '*'
|
||||
}
|
||||
});
|
||||
}
|
||||
);
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user