Enhanced errors and Yii2 7.1 compatibility
The error code is now also returned in case of error as it contains sometimes valuable data for figuring out what is wrong. Enhance in code documentation and made sure to extend from BaseObject instead of invalid Object.