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

404 on annotation_report when assembly has no annotations #321

Open
manulera opened this issue Feb 23, 2024 · 2 comments
Open

404 on annotation_report when assembly has no annotations #321

manulera opened this issue Feb 23, 2024 · 2 comments

Comments

@manulera
Copy link

Somewhat similar to #312.

In this case, I don't really know what the ideal response should be, but I was suprised to get a 404 when requesting annotations from an assembly that exists but does not have annotations. I thought 404 would only be returned if the assembly identifier does not exist, but I also see that the annotations don't exist.

This works: https://api.ncbi.nlm.nih.gov/datasets/v2alpha/genome/accession/GCA_023078545.1/dataset_report
404: https://api.ncbi.nlm.nih.gov/datasets/v2alpha/genome/accession/GCA_023078545.1/annotation_report

@syntheticgio
Copy link

@manulera

You are correct, this is inconsistent behavior. I don't believe there should be a 404 for the one you pointed out - it is true that annotations are not found but the resource is found (endpoint to the annotation report). A 404 should only be returned (IMO) if the client has done something wrong (i.e. bad URL), not if it was a correctly formatted URL.

I will create a bug ticket for this.

John

@manulera
Copy link
Author

Thanks @syntheticgio !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants