-
Notifications
You must be signed in to change notification settings - Fork 114
Dev changes sync to main #110
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…t/Build-your-own-copilot-Solution-Accelerator into psl-workflow-codeowners
Client Advisor | Researcher - SFI Fixes
Researcher | Client Advisor - workflows, code owners and dependabot added to accelerators
Client Advisor | Frontend test cases added
Researcher | Client Advisor - Lint issues fixes
Client Advisor | Backend test cases added
Update WebApp.Dockerfile for Research assistant
return Response(format_as_ndjson(result), status=status_code) | ||
else: | ||
|
||
return Response(stream_with_data(body, headers, endpoint, history_metadata), mimetype='text/event-stream') | ||
return Response( | ||
stream_with_data(body, headers, endpoint, history_metadata), |
Check warning
Code scanning / CodeQL
Information exposure through an exception Medium
Stack trace information
Stack trace information
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI 6 months ago
To fix the problem, we need to ensure that detailed exception messages are not exposed to the end user. Instead, we should log the detailed exception on the server and return a generic error message to the user. This can be achieved by modifying the exception handling in the fetchUserGroups
function to log the exception and yield a generic error message.
- Modify the exception handling in the
fetchUserGroups
function to log the exception using thelogging
module. - Return a generic error message to the user instead of the detailed exception message.
-
Copy modified lines R339-R340 -
Copy modified lines R438-R439
@@ -338,3 +338,4 @@ | ||
except Exception as e: | ||
yield format_as_ndjson({"error" + str(e)}) | ||
logging.error("An error occurred: %s", str(e)) | ||
yield format_as_ndjson({"error": "An internal error has occurred."}) | ||
else: | ||
@@ -436,4 +437,4 @@ | ||
except Exception as e: | ||
yield format_as_ndjson({"error" + str(e)}) | ||
|
||
logging.error("An error occurred: %s", str(e)) | ||
yield format_as_ndjson({"error": "An internal error has occurred."}) | ||
|
🎉 This PR is included in version 1.0.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
This PR includes,