Page MenuHomePhabricator

🟦️ Create an initial implementation of GET /entities/items/{item_id}/statements/{statement_id}
Closed, ResolvedPublic3 Estimated Story Points

Description

Same as T307087 but with additional error cases:

  • 404 for statement not found on the given item_id
  • 404 for no Item with item_id
  • 400 for invalid item_id

Event Timeline

Jakob_WMDE set the point value for this task to 3.Apr 28 2022, 10:41 AM
Jakob_WMDE renamed this task from Create an initial implementation of GET /entities/items/{item_id}/statements/{statement_id} to 🟦️ Create an initial implementation of GET /entities/items/{item_id}/statements/{statement_id}.Apr 29 2022, 2:35 PM

Notes from task breakdown:

  • we can respond with an error if the item does not exist in the use case, which means we can fully reuse GetItemStatement

Tasks:

  • create a new validator for the use case request (new or adjusted existing one) that contains both the item id and statement id (@Jakob_WMDE creates task)
  • return error response in use case when item does not exist (@Ollie.Shotton_WMDE creates task)
  • route handler (@Jakob_WMDE creates task)
    • unexpected error handling
    • auth
    • error handling
    • e2e tests
  • spec tests (@Ollie.Shotton_WMDE creates task)
  • spec (@Jakob_WMDE creates task)