change error status from 404 to 500