Change error return to produce 404 instead of 500 http error