Support promises in middleware

Suppose synchronous middleware that returns a promise. How should errors work however? Since falsy values can be used to reject the promise. The same issue exists for synchronous errors thrown actually.