From 89a4a69f6da706a0cd8c4036bc1aa4c6e44f6e11 Mon Sep 17 00:00:00 2001
From: Party Wumpus <48649272+PartyWumpus@users.noreply.github.com>
Date: Thu, 22 Feb 2024 16:38:50 +0000
Subject: make frontend -> backend errors actually work

---
 frontend/src/components/settings/pages/testing/index.tsx | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

(limited to 'frontend/src/components/settings/pages/testing/index.tsx')

diff --git a/frontend/src/components/settings/pages/testing/index.tsx b/frontend/src/components/settings/pages/testing/index.tsx
index cdf51c71..4fe0f240 100644
--- a/frontend/src/components/settings/pages/testing/index.tsx
+++ b/frontend/src/components/settings/pages/testing/index.tsx
@@ -70,8 +70,14 @@ export default function TestingVersionList() {
                   <Focusable style={{ height: '40px', marginLeft: 'auto', display: 'flex' }}>
                     <DialogButton
                       style={{ height: '40px', minWidth: '60px', marginRight: '10px' }}
-                      onClick={() => {
-                        downloadTestingVersion(version.id, version.head_sha);
+                      onClick={async () => {
+                        try {
+                          await downloadTestingVersion(version.id, version.head_sha);
+                        } catch (e) {
+                          if (e instanceof Error) {
+                            DeckyPluginLoader.toaster.toast({ title: 'Error Installing PR', body: e.message });
+                          }
+                        }
                         setSetting('branch', UpdateBranch.Testing);
                       }}
                     >
-- 
cgit v1.2.3

