Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[sqlalchemy] Return 404 for missing collection on /items #528

Merged
merged 2 commits into from
Feb 17, 2023

Conversation

gadomski
Copy link
Member

@gadomski gadomski commented Feb 14, 2023

Related Issue(s):

Description:

#120 was already fixed for pgstac but needed the fix for sqlalchemy. Planetary Computer check:

$ curl -i https://planetarycomputer.microsoft.com/api/stac/v1/collections/not-a-collection/items
HTTP/2 404 
content-length: 88
content-type: application/json
strict-transport-security: max-age=15724800; includeSubDomains
access-control-allow-origin: *
access-control-allow-credentials: true
x-cache: CONFIG_NOCACHE
x-azure-ref: 03MjrYwAAAAAJokhog0B4SJ7f/1kQix/yV1NURURHRTAxMTkAOTI3YWJmYTYtMTlmNi00YWYxLWEwOWQtYzk1OWQ5YTFlNjQ0
date: Tue, 14 Feb 2023 17:46:04 GMT

{"code":"NotFoundError","description":"No collection with id 'not-a-collection' found!"}

PR Checklist:

  • Code is formatted and linted (run pre-commit run --all-files)
  • Tests pass (run make test)
  • Documentation has been updated to reflect changes, if applicable, and docs build successfully (run make docs)
  • Changes are added to the CHANGELOG.

@gadomski gadomski added this to the 2.4.4 milestone Feb 14, 2023
@gadomski gadomski requested a review from pjhartzell February 14, 2023 17:46
@gadomski gadomski self-assigned this Feb 14, 2023
@gadomski gadomski force-pushed the issues/120-improper-200 branch from e07aabb to 2d8db11 Compare February 17, 2023 15:02
@gadomski gadomski requested a review from pjhartzell February 17, 2023 15:02
@gadomski gadomski enabled auto-merge (squash) February 17, 2023 15:08
@gadomski gadomski merged commit 7f60b8a into master Feb 17, 2023
@gadomski gadomski deleted the issues/120-improper-200 branch February 17, 2023 15:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Request to /collection/<missing>/items returns 200
2 participants