A lightweight utility to handle promises safely, returning an error or result in a predictable format.