Add try-catch around http.send

Fixes #145