use GetErrorCode instead of GetError

 - GetErrorCode is preffered as it can be shared between iOS and Android
 - GetError is now obsolete