handle errors from browserify