http error 500 instead of 404 in case of failure