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.
Ideally the store would provide the required information. We get currently: /api.snapcraft. io/api/ v1/snaps/ details/ robotfindskitte n X-Ubuntu- Architecture: arm64 X-Ubuntu-Series:16 fields= =anon_download_ url,architectur e,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 not-found" ,
"message" : "Snap 'robotfindskitten' (CDwOz6O4zGyVXL cHbxWx9K7XTGmZC Bye) has no published revisions in the given context." cHbxWx9K7XTGmZC Bye) has no published revisions in the given context."
"""
$ http --pretty=format --print b https:/
{
"error_list": [
{
"code": "resource-
}
],
"errors": [
"Snap 'robotfindskitten' (CDwOz6O4zGyVXL
],
"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.