Fixing Promise 'TypeError: myfunc(...).then(...).reject is not a function'
When encountering this error message in Javascript related to Promise
s:
TypeError: myfunc(...).then(...).reject is not a function
The solution is quite simple: When you want to catch the error from the promise, you need to use catch instead of reject like this:
myfunc(...).then(...).catch(...)
If this post helped you, please consider buying me a coffee or donating via PayPal to support research & publishing of new posts on TechOverflow