Replace exception with status code
Send email in web service