Check response code when getting devices