Added wrapper around promise rejection.