Uncaught (in promise) FrameworkError
时间: 2023-10-12 12:06:34 浏览: 97
解决Vue-Router升级导致的Uncaught (in promise)问题
Uncaught (in promise) FrameworkError错误是由于使用promise时产生的错误。根据引用的解决办法,可以在axios请求接口的then()后加上catch()来捕获错误并处理。具体做法是,在请求接口时,在then()后使用.catch()来捕获错误,然后使用Promise.reject()返回错误信息。引用中也提到了使用return Promise.reject(new Error(res.msg || 'Error'))来捕获处理异常,并在请求回来时使用.catch(err=>{console.log(err)})来捕获异常并打印错误信息。这样做可以返回接口返回的错误信息。此外,引用中还介绍了解决Vue-Router升级导致的Uncaught (in promise)问题的方法。希望这些方法能对您解决Uncaught (in promise) FrameworkError错误有所帮助。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* *2* [Uncaught (in promise) Error](https://blog.csdn.net/wh13821662259/article/details/117986956)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"]
- *3* [解决Vue-Router升级导致的Uncaught (in promise)问题](https://download.csdn.net/download/weixin_38702726/12924276)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文