datasets icon indicating copy to clipboard operation
datasets copied to clipboard

404 on annotation_report when assembly has no annotations

Open manulera opened this issue 4 months ago • 2 comments

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

manulera avatar Feb 23 '24 10:02 manulera

@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

syntheticgio avatar Feb 23 '24 19:02 syntheticgio

Thanks @syntheticgio !

manulera avatar Feb 27 '24 10:02 manulera