Closed srl295 closed 5 years ago
@JCEmmons this is to fix the 'unhandled rejection' warnings that you saw when js-client could not connect way back when.
I had marked this as a v4.0 (semver major), so it's probably OK to have the warning, if not break entirely.
@jugu yes, it will be 4.x. The breaking change is documented in the NEWS section of the readme: https://github.com/IBM-Cloud/gp-js-client/pull/155/files#diff-04c6e90faac2675aa89e2176d2eec7d8R21
~Deprecate~ Remove the
getClient()
function that returns a Client object. (Yes, the main API since the beginning of this project!)Instead, use
connect()
which returns a promise and actually tries to load the swagger.json. Callers are expected to handle any rejections right away.Fixes: https://github.com/IBM-Cloud/gp-js-client/issues/101