Add 404 exception for invalid hash