Return 404 instead of 500 when the entry is not found