CKAN's API guide documents JSON success and error fields in its Action API. For CKAN open-data clients, inspect that envelope as well as HTTP status.
Keep dataset metadata separate from the downloadable resource it describes. A catalog record alone does not prove the linked file remains available.