Skip to content

[DEV-15460] mitigate python stack trace returned to download user#4690

Merged
james-at-kc merged 5 commits into
qatfrom
ftr/dev-15460-remove-stack-trace-from-client-message
Jul 14, 2026
Merged

[DEV-15460] mitigate python stack trace returned to download user#4690
james-at-kc merged 5 commits into
qatfrom
ftr/dev-15460-remove-stack-trace-from-client-message

Conversation

@james-at-kc

@james-at-kc james-at-kc commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Description:

If an exception is encountered during the download generation process the /api/v2/download/status endpoint will return the Python stack trace in the API response’s message field. This can expose information about the API deployment environment.

Technical Details:

Log these error message for future reference, but remove from the API response.

Requirements for PR Merge:

  1. Unit & integration tests updated
  2. N/A - API documentation updated (examples listed below)
    1. API Contracts
    2. API UI
    3. Comments
  3. N/A - Data validation completed (examples listed below)
    1. Does this work well with the current frontend? Or is the frontend aware of a needed change?
    2. Is performance impacted in the changes (e.g., API, pipeline, downloads, etc.)?
    3. Is the expected data returned with the expected format?
  4. N/A - Appropriate Operations ticket(s) created
  5. Jira Ticket(s)
    1. DEV-15460

Explain N/A in above checklist:

N/A for number 2 - no change to API - generic message returned instead of stack trace
N/A for number 3 - no change to frontend, performance nor expected data
N/A for number 4 - No operations tickets required - straight merge to qat then default promotion to prod.

@james-at-kc james-at-kc marked this pull request as ready for review July 10, 2026 14:43

@zachflanders-frb zachflanders-frb left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, I left one non blocking comment for consideration.

Comment thread usaspending_api/download/v2/download_status.py Outdated
@james-at-kc james-at-kc merged commit bf704d7 into qat Jul 14, 2026
19 checks passed
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.

2 participants