We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 11db3a6 commit 10dd0adCopy full SHA for 10dd0ad
1 file changed
src/views/Submit.vue
@@ -818,12 +818,21 @@ 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',
827
+ 'There was an error submitting the form: {message}',
828
+ {
829
+ message: errorMessage,
830
+ },
831
+ ),
832
+ )
833
+ } else {
834
+ showError(t('forms', 'There was an error submitting the form'))
835
+ }
836
} finally {
837
this.loading = false
838
if (!this.publicView) {
0 commit comments