Skip to content

Bug: GET /items/:id returns 500 when item is missing #27

Description

@ascerra

Bug

GET /items/99999 (non-existent id) returns HTTP 500 instead of 404.

Steps to reproduce

  1. Start the app (python app.py or equivalent).
  2. curl -i http://127.0.0.1:5000/items/99999

Expected

HTTP 404 with a JSON body like {"error": "item not found"}.

Actual

HTTP 500 Internal Server Error. Stack trace mentions a missing key / unhandled lookup in the items handler.

Environment

Python 3.12, Linux, current main.

Notes

This is an API correctness bug on the items endpoint. Please triage with normal labeling for this repo.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/apiAPI and HTTP endpoint issuesduplicateThis issue or pull request already exists

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions