fix: improve error handling

Signed-off-by: Benjamin Janssens <benji.janssens@gmail.com>
This commit is contained in:
Benjamin Janssens
2024-06-07 15:52:45 +02:00
parent 0c5a38e854
commit be26d90de1
@@ -97,7 +97,11 @@ export const BitbucketRepoPicker = (props: {
}
};
updateAvailableWorkspaces();
try {
updateAvailableWorkspaces();
} catch {
setAvailableWorkspaces([]);
}
},
500,
[client, host],
@@ -126,7 +130,11 @@ export const BitbucketRepoPicker = (props: {
}
};
updateAvailableRepositories();
try {
updateAvailableRepositories();
} catch {
onChange({ availableRepos: [] });
}
},
500,
[client, workspace, project, onChange],
@@ -153,7 +161,11 @@ export const BitbucketRepoPicker = (props: {
}
};
updateAvailableProjects();
try {
updateAvailableProjects();
} catch {
setAvailableProjects([]);
}
},
500,
[client, workspace],