I think you should simply do cmdCallback(error) here. The SDK already return an error object, so wrapping one in the other wont work well.