Restored prev. dieOnError()'s args handling code and using it to call APIErrors::getErrorData()
PLAT-653 #time 5m