Gated datasets without authentication header return 404
It should return 401 (Unauthorized).

See for example https://datasets-server.huggingface.co/splits?dataset=severo/bigcode/the-stack from a private window.

Or https://datasets-server.huggingface.co/splits?dataset=JosephusCheung/GuanacoDataset (if you have not access to it), while passing credentials (opening it while logged in Hugging Face will pass your cookie)
Gated datasets without authentication header return 404: It should return 401 (Unauthorized).

See for example https://datasets-server.huggingface.co/splits?dataset=severo/bigcode/the-stack from a private window.

Or https://datasets-server.huggingface.co/splits?dataset=JosephusCheung/GuanacoDataset (if you have not access to it), while passing credentials (opening it while logged in Hugging Face will pass your cookie)