From 0fe7967b239a8bb30a3b40ab4679c1c9bfb86642 Mon Sep 17 00:00:00 2001 From: Thumbscrew Date: Tue, 5 Apr 2022 14:23:43 +0100 Subject: [PATCH] add `return` if error is caught on sync --- public/Get-MatrixRoomMessages.ps1 | 1 + 1 file changed, 1 insertion(+) diff --git a/public/Get-MatrixRoomMessages.ps1 b/public/Get-MatrixRoomMessages.ps1 index 8c6b1f8..53d76ef 100644 --- a/public/Get-MatrixRoomMessages.ps1 +++ b/public/Get-MatrixRoomMessages.ps1 @@ -54,6 +54,7 @@ function Get-MatrixRoomMessages { $res = Invoke-RestMethod -Uri $url -Headers $headers } catch { Write-Error $_ + return } $events = $res.rooms.join.($RoomId).timeline.events