From 12afcba1ec2edd2705f381450a6ccaea3e75ede8 Mon Sep 17 00:00:00 2001 From: Christy Jacob Date: Thu, 23 Mar 2023 12:39:02 +0000 Subject: [PATCH] fix: status code check on feedback submit --- .gitpod.yml | 9 +++++++++ src/lib/stores/app.ts | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 .gitpod.yml diff --git a/.gitpod.yml b/.gitpod.yml new file mode 100644 index 000000000..3c1848749 --- /dev/null +++ b/.gitpod.yml @@ -0,0 +1,9 @@ +# This configuration file was automatically generated by Gitpod. +# Please adjust to your needs (see https://www.gitpod.io/docs/introduction/learn-gitpod/gitpod-yaml) +# and commit this file to your remote git repository to share the goodness with others. + +# Learn more from ready-to-use templates: https://www.gitpod.io/docs/introduction/getting-started/quickstart + +tasks: + - init: npm install && npm run build + command: npm run dev diff --git a/src/lib/stores/app.ts b/src/lib/stores/app.ts index 4ddd2e08a..66946f3f1 100644 --- a/src/lib/stores/app.ts +++ b/src/lib/stores/app.ts @@ -74,7 +74,7 @@ function createFeedbackStore() { customFields: value ? [{ id: '40655', value }] : undefined }) }); - if (response.status !== 200) { + if (response.status >= 400) { throw new Error('Failed to submit feedback'); } }