Update wrap.js

catchall.error should be called in catch block