You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is something I noticed related to the alias navigation introduced in #430.
When having the Inspect console open while browsing the Catalog, I noticed 404'd GET requests being made to JSON files with valid dataset IDs, but nonsensical versions (not seen anywhere in the dataset).
They are coming from this piece of code, introduced in 3f3963d:
With the getFilePath(this.selectedDataset.dataset_id), the version is null, we fall into else clause, and the "version" (filename) becomes an md5 hash of the dataset ID.
is returning the md5 of the dataset ID intentional?
can there be an alternative to making an additional GET request any time a dataset page is opened?
can the request errors be silenced to avoid confusion?
Sorry if this is a little rambling, but it confused me while debugging an unrelated thing, and I wanted to jot this down before I forget.
The text was updated successfully, but these errors were encountered:
Sorry for taking so long to respond, this issue slipped past me.
is returning the md5 of the dataset ID intentional?
Yes, because that gives us the filename of the "concept-ID redirect file", which will point to a specific dataset id+version metadata file. to be rendered If the alias was used for navigation, the alias would be the argument that is passed to the same function (instead of the ID), and it would give us the "alias redirect file".
can there be an alternative to making an additional GET request any time a dataset page is opened?
it could perhaps be possible, but at the time when I wrote this code, I couldn't think of a different/better way. If you have ideas, feel free to share.
can the request errors be silenced to avoid confusion?
Yes, I did this a while back for some of the requests, but apparently didn't propagate to all fetch calls. I will need to check where and how I did this. Definitely a good idea, to silence some expected "errors".
The questions were answered and the remaining issue is the console error when being unable to load a resource. These posts suggest it is unwise to do so:
This is something I noticed related to the alias navigation introduced in #430.
When having the Inspect console open while browsing the Catalog, I noticed 404'd GET requests being made to JSON files with valid dataset IDs, but nonsensical versions (not seen anywhere in the dataset).
They are coming from this piece of code, introduced in 3f3963d:
datalad-catalog/datalad_catalog/catalog/assets/app_component_dataset.js
Lines 295 to 306 in 821b12f
The "version" (json file name) is coming from
getFilePath(this.selectedDataset.dataset_id)
, defined here in 7dfbda7:datalad-catalog/datalad_catalog/catalog/assets/app_globals.js
Lines 57 to 78 in 821b12f
With the
getFilePath(this.selectedDataset.dataset_id)
, the version is null, we fall into else clause, and the "version" (filename) becomes an md5 hash of the dataset ID.Sorry if this is a little rambling, but it confused me while debugging an unrelated thing, and I wanted to jot this down before I forget.
The text was updated successfully, but these errors were encountered: