Skip to content

Commit d6b7895

Browse files
committed
Fixing try catch device payload edit
1 parent aa69ebd commit d6b7895

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

backend/src/modules/broker/services/mqtt.service.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -256,14 +256,14 @@ export class MqttService implements OnModuleInit {
256256
}
257257

258258
if (shouldTrigger(String(parsedPayload.from), 6)) {
259-
const deviceData =
259+
try {
260+
const deviceData =
260261
await this.deviceService.getDeviceInfoByEncryptedId(
261262
String(parsedPayload.from),
262263
'',
263264
true,
264265
);
265266

266-
try {
267267
await this.deviceService.editDevice(
268268
{
269269
deviceId: String(deviceData?._id),

0 commit comments

Comments
 (0)