MrSwitch / hello.js

A Javascript RESTFUL API library for connecting with OAuth2 services, such as Google+ API, Facebook Graph and Windows Live Connect
https://adodson.com/hello.js/
MIT License
4.63k stars 549 forks source link

Uncaught in Promise error when login was cancelled by user #518

Open paulopmx opened 7 years ago

paulopmx commented 7 years ago

Uncaught (in promise) {mode: "social", orgId: "5e00f1b9-82c7-4190-b080-3fb8c93d123d", widgetId: "widgetsA-d836-4dca-83f1-6b338804618e", error: {…}, error_code: "200", …}

I've tried adding my own es6 .catch(), in the promise return, but this is still being triggered.

MrSwitch commented 7 years ago

Hi @paulopmx

You will have more luck with the next version https://github.com/MrSwitch/hello.js#try-out-the-next-version which defines api, login, logoff methods as Async.

paulopmx commented 7 years ago

Thanks for the response Andrew. However, I resolve the issue by changing my gulp-uglify to gulp-uglify-es. I was already using your next version 2.0.0.4. Might be something useful for your future users. May I ask another question, if I changed my FB Graph API to 2.10, would that work with 2.0.0.4? Again thank you.

MrSwitch commented 7 years ago

Ok babel-polyfill might have worked also

The facebook version is defined in https://github.com/MrSwitch/hello.js/blob/v2/src/modules/facebook.js#L11, easiest thing is to update hellojs to bump this.