diff --git a/app/components/onboarding/AddModuleView.vue b/app/components/onboarding/AddModuleView.vue index ec546b797..108577a31 100644 --- a/app/components/onboarding/AddModuleView.vue +++ b/app/components/onboarding/AddModuleView.vue @@ -30,6 +30,8 @@ import SharedComponents from "@/components/shared"; import { LegacyStation, ScanStationModulesAction } from "~/store"; import ConnectionStatusHeader from "~/components/ConnectionStatusHeader.vue"; import { routes } from "@/routes"; +import { Dialogs } from "@nativescript/core"; +import { _L } from "@/lib"; export default Vue.extend({ props: { @@ -77,7 +79,10 @@ export default Vue.extend({ this.stopAnimation(); }, async goNext(ev: Event): Promise { - await this.$store.dispatch(new ScanStationModulesAction(this.currentStation.deviceId)); + await this.$store.dispatch(new ScanStationModulesAction(this.currentStation.deviceId)) + .catch(e => { + return Dialogs.alert(_L("moduleAddError")); + }) await Promise.all([ this.$deprecatedNavigateTo(routes.onboarding.recalibrate, { diff --git a/app/locales/en.json b/app/locales/en.json index b72c36c07..1f00964d3 100644 --- a/app/locales/en.json +++ b/app/locales/en.json @@ -1088,5 +1088,6 @@ }, "registerTncLabel": "By creating an account you agree to our", "registerTncLabelLink": "Terms of Use.", - "mustBeConnected": "You must be connected to the internet!" + "mustBeConnected": "You must be connected to the internet!", + "moduleAddError": "There is an error adding this module, please check your station and module configuration." } diff --git a/app/locales/es.json b/app/locales/es.json index a57b4cc08..0660c2f34 100644 --- a/app/locales/es.json +++ b/app/locales/es.json @@ -1011,5 +1011,6 @@ }, "registerTncLabel": "Al crear una cuenta, aceptas nuestra", "registerTncLabelLink": "Términos de uso.", - "mustBeConnected": "¡Debes estar conectado a internet!" + "mustBeConnected": "¡Debes estar conectado a internet!", + "moduleAddError": "There is an error adding this module, please check your station and module configuration." } diff --git a/app/store/modules/nearby.ts b/app/store/modules/nearby.ts index 997d8539f..90823fb36 100644 --- a/app/store/modules/nearby.ts +++ b/app/store/modules/nearby.ts @@ -402,6 +402,9 @@ const actions = (services: ServiceRef) => { .then((statusReply) => { commit(MutationTypes.STATION_ACTIVITY, info); return dispatch(new StationRepliedAction(statusReply, info.url), { root: true }); + }, + (error) => { + return Promise.reject(error); }); }, [ActionTypes.SCAN_STATION_NETWORKS]: ({ commit, dispatch, state }: ActionParameters, payload: { deviceId: string }) => {