diff --git a/ts/rmo/content/Water.vue b/ts/rmo/content/Water.vue index 6d8eff51..dfc299d0 100644 --- a/ts/rmo/content/Water.vue +++ b/ts/rmo/content/Water.vue @@ -492,7 +492,16 @@ select.tall {

-
@@ -584,6 +593,7 @@ import { computed, onMounted, ref } from "vue"; import { useRouter } from "vue-router"; import ImageUpload, { Image } from "@/components/ImageUpload.vue"; import AddressAndMapLocator from "@/rmo/components/AddressAndMapLocator.vue"; +import ErrorNotification from "@/rmo/components/ErrorNotification.vue"; import Tooltip from "@/components/Tooltip.vue"; import { useStoreGeocode } from "@/store/geocode"; import { useStoreLocal } from "@/store/local"; @@ -658,8 +668,12 @@ async function doSubmit() { const resp = await fetch("/api/rmo/water", { method: "POST", body: formData, - // Don't set Content-Type, the borwser should do it + // Don't set Content-Type, the browser should do it }); + if (!resp.ok) { + errorMessage.value = "Something went wrong. Your request could not be completed. Please try again."; + return; + } const data: PublicReport = (await resp.json()) as PublicReport; storePublicReport.add(data); router.push("/submitted/" + data.public_id);