Promise 拦截器 eslink reject报错 Expected the Promise rejection reason to be an Error

我是这样写的

reject('getInfo: roles must be a non-null array !')

解决:在promise的reject中需要传入的是一个Error对象. 

reject(new Error('getInfo: roles must be a non-null array !'))

猜你喜欢

转载自blog.csdn.net/duanran0/article/details/86005575