We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 11db3a6 commit 059261aCopy full SHA for 059261a
1 file changed
src/views/Submit.vue
@@ -818,12 +818,18 @@ export default {
818
this.deleteFormFieldFromLocalStorage()
819
emit('forms:last-updated:set', this.form.id)
820
} catch (error) {
821
+ const errorMessage = error.response?.data?.ocs?.meta?.message
822
logger.error('Error while submitting the form', { error })
- showError(
823
- t('forms', 'There was an error submitting the form: {message}', {
824
- message: error.response.data.ocs.meta.message,
825
- }),
826
- )
+ if(errorMessage) {
+ showError(
+ t('forms', 'There was an error submitting the form: {message}', {
+ message: errorMessage,
827
+ }),
828
+ )
829
+ } else {
830
+ showError(t('forms', 'There was an error submitting the form'))
831
+ }
832
+
833
} finally {
834
this.loading = false
835
if (!this.publicView) {
0 commit comments