added log

This commit is contained in:
hannathkadher
2024-12-18 10:21:50 +04:00
parent 196abad8ba
commit 422e3b1581
2 changed files with 2 additions and 3 deletions

View File

@ -30,7 +30,6 @@ export class SpaceDeviceService {
HttpStatus.BAD_REQUEST,
);
}
const safeFetch = async (device: any) => {
try {
const tuyaDetails = await this.getDeviceDetailsByDeviceIdTuya(
@ -48,7 +47,7 @@ export class SpaceDeviceService {
};
} catch (error) {
console.warn(
`Skipping device with deviceTuyaUuid: ${device.deviceTuyaUuid} due to error.`,
`Skipping device with deviceTuyaUuid: ${device.deviceTuyaUuid} due to error. ${error}`,
);
return null;
}

View File

@ -325,7 +325,7 @@ export class SpaceService {
private async validateSpace(spaceUuid: string) {
const space = await this.spaceRepository.findOne({
where: { uuid: spaceUuid },
relations: ['devices'],
relations: ['devices', 'devices.productDevice'],
});
if (!space) this.throwNotFound('Space', spaceUuid);
return space;