function doSomething() { return new Promise((resolve,reject)={ setTimeout(reject,100); }) .catch(() => []) } doSomething().then((arg) => console.log(arg));