Skip to content

Commit 1862b00

Browse files
fix for code scanning alert no. 27: Information exposure through an exception
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
1 parent 4a0a9dc commit 1862b00

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

project/block_manager/views/export_views.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -182,10 +182,7 @@ def export_model(request: Request) -> Response:
182182
import traceback
183183
logger.error(f"Error in export_model: {str(e)}", exc_info=True)
184184
response = {
185-
'error': 'Code generation failed',
186-
'details': str(e)
185+
'error': 'Code generation failed'
187186
}
188-
if settings.DEBUG:
189-
response['traceback'] = traceback.format_exc()
190187
return Response(response, status=status.HTTP_500_INTERNAL_SERVER_ERROR)
191188

0 commit comments

Comments
 (0)