diff --git a/src/components/CreateVirtualFacilityModal.vue b/src/components/CreateVirtualFacilityModal.vue index 59f34757..155575c3 100644 --- a/src/components/CreateVirtualFacilityModal.vue +++ b/src/components/CreateVirtualFacilityModal.vue @@ -137,9 +137,13 @@ export default defineComponent({ } else { throw resp.data; } - } catch (error) { + } catch (error: any) { logger.error(error) - showToast(translate('Failed to create parking.')) + if(error?.response?.data?.error?.message) { + showToast(error.response.data.error.message) + } else { + showToast(translate('Failed to create parking.')) + } } modalController.dismiss() },