Skip to content

Commit

Permalink
feat(init): change throw error to warning when init without secretId/…
Browse files Browse the repository at this point in the history
…secretKey

change throw error to warning when init without secretId/secretKey

BREAKING CHANGE: change throw error to warning when init without secretId/secretKey
  • Loading branch information
lou1swu committed Sep 23, 2019
1 parent c1ec228 commit 314b338
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class SDK {
};
const __config = _.omitBy(_.merge({}, defaultConfig, config), _.isUndefined);
if (!__config.secretId || !__config.secretKey)
throw Error(error_1.ERR_MISSING_SECRET);
return console.warn(error_1.ERR_MISSING_SECRET);
this.config = __config;
const capi = new Capi({
SecretId: __config.secretId,
Expand Down
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class SDK {
}
const __config = _.omitBy(_.merge({}, defaultConfig, config), _.isUndefined)
if (!__config.secretId || !__config.secretKey)
throw Error(ERR_MISSING_SECRET)
return console.warn(ERR_MISSING_SECRET)

this.config = __config
const capi = new Capi({
Expand Down

0 comments on commit 314b338

Please sign in to comment.