getUser hangs if id is an empty string
dncrews opened this issue · 4 comments
dncrews commented
We realized we needed to add some defensive programming on our end to make sure this doesn't happen, but it's likely something you could hopefully prevent for everyone else.
What did you do?
const Client = require('@okta/okta-sdk-nodejs');
const client = new Client.Client({ orgUrl: '//', token: '//' });
client.getUser('')
.then((response) => {
console.info({ response });
})
.catch((error) => {
console.error({ error });
});
Expected results
Since this is a promise, I would expect this to reject with some error. Since it is a promise, it should resolve or reject or something.
Actual results
The request happens in the background, but the promise never resolves or rejects. The script just runs and exits without ever logging anything.
shuowu commented
@dncrews Thanks for reporting the issue!
Internal Ref: OKTA-332240
GirkovArpa commented
Why is there a $50 bounty for this issue at bountysource, given that it's marked as closed here?