updated error code for remote gateway and hub handling.