From 99c38079b3b1d3b629a84d599d66a7597e34c9e7 Mon Sep 17 00:00:00 2001 From: Matthew Aaron Raymer Date: Thu, 2 Feb 2023 17:51:03 +0800 Subject: [PATCH] More fixes due to typing in catch --- src/views/NewEditProjectView.vue | 4 ++-- src/views/ProjectsView.vue | 41 ++++++++++++++++++++++++++++++++ 2 files changed, 43 insertions(+), 2 deletions(-) diff --git a/src/views/NewEditProjectView.vue b/src/views/NewEditProjectView.vue index a5392862f..43aa29a79 100644 --- a/src/views/NewEditProjectView.vue +++ b/src/views/NewEditProjectView.vue @@ -190,9 +190,9 @@ export default class NewEditProjectView extends Vue { this ); } - } catch (error: unknown) { + } catch (error) { let userMessage = "There was an error. See logs for more info."; - const serverError = error.response?.data?.error as AxiosError; + const serverError = error as AxiosError; if (serverError) { if (serverError.message) { userMessage = serverError.message; // This is info for the user. diff --git a/src/views/ProjectsView.vue b/src/views/ProjectsView.vue index 96b3869f8..f91125be5 100644 --- a/src/views/ProjectsView.vue +++ b/src/views/ProjectsView.vue @@ -1,4 +1,45 @@