learningequality / learningequality/studio

Fix 500 error in `get_node_details` for missing node

Open
#5,784 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug TODO: needs review
Dominant language
Python
Stars
191
Forks
307
Avg merge
5d 6h
Merged PRs (30d)
10

Description

This issue is not open for contribution. Visit Contributing guidelines to learn about the contributing process and how to find suitable issues.

Description

get_node_details() returns 500 when the node doesn’t exist.


Fix
node = get_object_or_404(ContentNode, pk=node_id)

Why

Returns proper 404 instead of crashing.

Contributor guide

Open the 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.

Research direction

Find the get_node_details() entry point and inspect how it looks up ContentNode by node_id. Reproduce the request for a missing node, then verify that the response is a 404 rather than a 500. The issue is marked as not open for contribution, so check the contributing guidelines before proceeding.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
api, backend
Issue type
Bug
Difficulty
1/5
Estimated time
Under an hour
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.