Skip to content

fix API transaction DELETE handling to return 404 on non-existing item #2223

@tomkralidis

Description

@tomkralidis

Description
Running an API DELETE query on a repository where a given identifier does not exist does not return a 404 (but should).
Steps to Reproduce

  • run pygeoapi with a collection that has a provider with transactional capabilities (then setting provider editable: true)
  • issue curl -X 'DELETE' \ 'http://localhost:5000/collections/some-collection/items/id-notfound' \ -H 'accept: */*'
    Expected behavior
    API should return 404, not 201.
    Screenshots/Tracebacks
    If applicable, add screenshots to help explain your problem.

Environment

  • OS: any
  • Python version: 3.12
  • pygeoapi version: master

Additional context
Discovered as part of #2220 (review)

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions