diff --git a/src/space/services/subspace/subspace-device.service.ts b/src/space/services/subspace/subspace-device.service.ts index 3b453fd..0e57bda 100644 --- a/src/space/services/subspace/subspace-device.service.ts +++ b/src/space/services/subspace/subspace-device.service.ts @@ -100,7 +100,7 @@ export class SubspaceDeviceService { if (!device.subspace || device.subspace.uuid !== subspace.uuid) { throw new HttpException( - 'Device is not associated with the specified subspace', + `Device ${deviceUuid} is not associated with the specified subspace ${subSpaceUuid} `, HttpStatus.BAD_REQUEST, ); } @@ -169,6 +169,7 @@ export class SubspaceDeviceService { private async findDevice(deviceUuid: string) { const device = await this.deviceRepository.findOne({ where: { uuid: deviceUuid }, + relations: ['subspace'], }); if (!device) { this.throwNotFound('Device', deviceUuid);