add a proper error enum for Promises