![](/img/trans.png)
[英]NodeJs, 500 failed to obtain access token (Error: connect ECONNREFUSED) at at process._tickCallback (node.js:419:13)
[英]What is process._tickCallback Node.js error
我和我的朋友在node.js中從事項目。 我們有一個錯誤,我們不知道它是什么。 你們能解釋一下嗎? 這是錯誤:
at process._tickCallback (internal/process/next_tick.js:188:7)
(node:10758) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwin
g inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch().
(rejection id: 2335)
PS:我的朋友不允許我發布代碼。
當開發人員忘記通過.catch()
添加異步錯誤處理或try... catch
時,將發生此錯誤。 相比:
(async function main() {
try {
await Promise.reject();
} catch (err) {
console.error('Rejection handled.');
}
})();
Rejection handled.
(async function main() {
await Promise.reject();
})();
UnhandledPromiseRejectionWarning: ...
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.