Fixing Promise ‘TypeError: myfunc(…).then(…).reject is not a function’

This post is also available in: deDeutsch (German)

When encountering this error message in Javascript related to Promises:

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(...)