check the return code from gate server