Generic exception mapper for rest.