replace try/catch with browserify for copay.js