Comment 1 for bug 1701232

Revision history for this message
Michael Vogt (mvo) wrote :

Ideally the store would provide the required information. We get currently:
"""
$ http --pretty=format --print b https://api.snapcraft.io/api/v1/snaps/details/robotfindskitten X-Ubuntu-Architecture:arm64 X-Ubuntu-Series:16 fields==anon_download_url,architecture,channel,download_sha3_384,summary,description,binary_filesize,download_url,icon_url,last_updated,license,package_name,prices,publisher,ratings_average,revision,screenshot_urls,snap_id,support_url,title,content,version,origin,developer_id,private,confinement channel==edge
{
    "error_list": [
        {
            "code": "resource-not-found",
            "message": "Snap 'robotfindskitten' (CDwOz6O4zGyVXLcHbxWx9K7XTGmZCBye) has no published revisions in the given context."
        }
    ],
    "errors": [
        "Snap 'robotfindskitten' (CDwOz6O4zGyVXLcHbxWx9K7XTGmZCBye) has no published revisions in the given context."
    ],
    "result": "error"
}

"""

As a workaround we do it with the current store responses. Then we would have to do an additional http request that omits "X-Ubuntu-Architecture" after each 404. If this extra request did not give us a 404 we can print the nicer error message. But it would be preferable to have this from the store directly.