diff --git a/photon-client/src/components/cameras/CameraCalibrationCard.vue b/photon-client/src/components/cameras/CameraCalibrationCard.vue index 638b52b1b..0458e6bc7 100644 --- a/photon-client/src/components/cameras/CameraCalibrationCard.vue +++ b/photon-client/src/components/cameras/CameraCalibrationCard.vue @@ -182,8 +182,10 @@ const startCalibration = () => { const showCalibEndDialog = ref(false); const calibCanceled = ref(false); const calibSuccess = ref(undefined); +const calibEndpointFail = ref(false); const endCalibration = () => { calibSuccess.value = undefined; + calibEndpointFail.value = false; if (!useStateStore().calibrationData.hasEnoughImages) { calibCanceled.value = true; @@ -196,7 +198,13 @@ const endCalibration = () => { .then(() => { calibSuccess.value = true; }) - .catch(() => { + .catch((e) => { + if (e.response) { + // Server returned a status code + } else if (e.request) { + // Something went wrong. Unsure if calibration actually worked + calibEndpointFail.value = true; + } calibSuccess.value = false; }) .finally(() => { @@ -525,6 +533,13 @@ const setSelectedVideoFormat = (format: VideoFormat) => { }}! +