Consider a scenario where there is a promise chain structured as shown below. The goal is to prevent func3 or func4 from being called when func2 is invoked.
AsyncFunction()
.then(func1, func2)
.then(func3, func4)
Currently, throwing an error in func2 results in func4 being called. On the other hand, returning a value in func2 appears to trigger the execution of func3.
This situation involves the use of Angular $q.