API & Client - update API error messages to remove i18n workarounds

This commit is contained in:
Sam
2021-11-01 09:44:10 +01:00
parent fb6491638c
commit 7f6f33a6aa
36 changed files with 357 additions and 340 deletions

View File

@ -356,7 +356,12 @@
} else {
if (withGpx.value) {
if (!gpxFile) {
throw new Error('No file provided !!')
const errorMessage = 'workouts.NO_FILE_PROVIDED'
store.commit(
ROOT_STORE.MUTATIONS.SET_ERROR_MESSAGES,
errorMessage
)
return
}
payload.file = gpxFile
store.dispatch(WORKOUTS_STORE.ACTIONS.ADD_WORKOUT, payload)