Skip to content

patients: return generic error message from patient_file_upload#1522

Open
davmlaw wants to merge 1 commit intomasterfrom
fix/patient-file-upload-error-disclosure
Open

patients: return generic error message from patient_file_upload#1522
davmlaw wants to merge 1 commit intomasterfrom
fix/patient-file-upload-error-disclosure

Conversation

@davmlaw
Copy link
Copy Markdown
Contributor

@davmlaw davmlaw commented Apr 2, 2026

Summary

  • Exception detail from patient_file_upload() was being returned directly to the client as {"error": str(e)}
  • Changed to return a generic "Upload failed" message; full exception is still logged server-side via log_traceback()

Related: SACGF/variantgrid_private#3829

Test plan

  • Upload a valid patient file — confirm success response unchanged
  • Trigger an upload failure (e.g. invalid patient ID) — confirm response contains generic error, not exception detail
  • Confirm full traceback still appears in server logs

Exception detail was being returned directly to the client; log it
server-side only.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant