Properly pass error resultcode through