Unsupported Excel export types return HTTP 500

Open Beginner friendly
#488 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 8 days

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
82/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
python
Domain
backend

Research direction

Start with app/controllers/admin_routes/excelDownload.py and trace how the endpoint selects export types and sets completePath for /excel/conflicts/202112. Check the existing routes or tests for Cross-listed and Special Topics downloads. Done means unsupported types return a controlled 4xx response while both supported downloads still work for an existing term.

Written by the indexing model from the issue text.

Description

Description

The secondary Excel export endpoint used by Cross-listed Courses throws a server error for an unsupported export type. This is reproducible with a mistyped or stale export URL.

Steps to Reproduce

  1. In a local CAS development instance, request /excel/crossListed/202112 as an administrator.
  2. Request /excel/conflicts/202112 directly.

Expected Behavior

Supported types download a workbook. Unsupported types receive a clear 400 or 404 response.

Actual Behavior

The cross-listed export returns 200 and the XLSX content type. The unsupported type returns 500 with UnboundLocalError for completePath. Reproduced locally on 7697416.

Acceptance Criteria

  • Unsupported types return a controlled 4xx response.
  • Cross-listed and Special Topics Excel downloads still succeed for an existing term.

Affected file: app/controllers/admin_routes/excelDownload.py.

<img width="990" height="636" alt="image" src="https://github.com/user-

Dominant language
JavaScript
Stars
0
Forks
4
Avg merge
6d 6m
Merged PRs (30d)
5

Getting set up

Open in Codespaces

Starts the project's dev container in your browser, under your own GitHub account.

  • No Dockerfile or Docker Compose file
  • Has a pull request template
  • No contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from BCStudentSoftwareDevTeam/cas

All issues in BCStudentSoftwareDevTeam/cas

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.