|
@@ -144,7 +144,7 @@ namespace WingDeviceService.Service
|
|
|
var deviceDb = await _deviceInfoDBServiceProxy.FindDeviceInfoByCodeAsync(request.DeviceCode);
|
|
|
if (deviceDb == null || deviceDb.DeviceCode != request.DeviceCode)
|
|
|
{
|
|
|
- throw new RpcException(1001, "DeviceInfo not exist error", "DeviceInfo not exist error");
|
|
|
+ throw new NoExistDeviceException();
|
|
|
}
|
|
|
|
|
|
var organizationName = "";
|
|
@@ -198,7 +198,7 @@ namespace WingDeviceService.Service
|
|
|
var deviceDb = await _deviceInfoDBServiceProxy.FindDeviceInfoByShortCodeAsync(request.ShortCode);
|
|
|
if (deviceDb == null || deviceDb.ShortCode != request.ShortCode)
|
|
|
{
|
|
|
- throw new RpcException(1001, "DeviceInfo not exist error", "DeviceInfo not exist error");
|
|
|
+ throw new NoExistDeviceException();
|
|
|
}
|
|
|
return await MapToExtendDTO(deviceDb);
|
|
|
}
|
|
@@ -399,7 +399,8 @@ namespace WingDeviceService.Service
|
|
|
}
|
|
|
if (userInfoDO.BindDevices != null && userInfoDO.BindDevices.Contains(deviceDb.DeviceCode))
|
|
|
{
|
|
|
- throw new RpcException(20046, "Device already bound", "Device already bound");
|
|
|
+
|
|
|
+ throw new HasAddDeviceException();
|
|
|
}
|
|
|
try
|
|
|
{
|