make frontend -> backend errors actually work

This commit is contained in:
Party Wumpus
2024-02-22 16:38:50 +00:00
parent a449181802
commit 89a4a69f6d
4 changed files with 40 additions and 14 deletions
@@ -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);
}}
>