Throwing error since promise cannot be rejected here