fix: check if device not found (#458)

This commit is contained in:
ZaydSkaff
2025-07-08 16:55:56 +03:00
committed by GitHub
parent 0bb178ed10
commit 5cf45c30f4

View File

@ -717,6 +717,9 @@ export class DeviceService {
relations: ['productDevice'],
});
if (!deviceDetails) {
throw new NotFoundException('Device not found');
}
let result = await this.tuyaService.getDeviceDetails(deviceId);
if (!result) {