campus.api: GET /submissions/for-student returns 404 for "no submission yet" — semantic noise, make it 200-empty

Open
#1,247 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
50/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
python
Domain
api

Research direction

The route is GET /api/v1/submissions/for-student in campus.api, and the issue says the underlying list call already returns 200-empty while the route turns that empty result into a 404. Start by finding where the route maps the empty case to 404 and confirm the list call's behaviour. Done means the empty case returns 200 with an empty payload (or 204) while wrong ids still return 404, and consumers treat empty as normal. The choice between 200 and 204 is not settled in the issue, so check with a maintainer first.

Written by the indexing model from the issue text.

Description

Found by the 2026-11-24 prod classroom journey investigation (32× 404 vs 7× 200 across 12 students in one week).

GET /api/v1/submissions/for-student uses 404 to mean "the student has no submission yet" — the underlying campus.api list call returns 200-empty, but the route escalates the empty case to 404. Every fresh assignment view by a student therefore produces a scary 404 span that reads like an outage in trace reviews (it dominated the investigation's error table until explained).

Proposal: return 200 with an empty payload (or 204) for the empty case; reserve 404 for genuinely wrong ids. Classroom-side consumers should treat empty as the normal pre-submission state.

Evidence: prod trace review 2026-11-17→11-24, client uid-client-38c9647e; e.g. trace ca5dff91e6894ccaa807fe084fa76148 (404 probe) vs f187dcf1e7ed4269a1a8efa78e890532 (post-export 200).

Dominant language
Python
Stars
0
Forks
2
Avg merge
39m
Merged PRs (30d)
235

Getting set up

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 nyjc-computing/campus

All issues in nyjc-computing/campus

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.