diff options
author | korelstar <korelstar@users.noreply.github.com> | 2021-06-27 16:15:06 +0300 |
---|---|---|
committer | korelstar <korelstar@users.noreply.github.com> | 2021-06-27 16:29:47 +0300 |
commit | 7976ac032dc26c4956073bdc025248facbc3cef2 (patch) | |
tree | 6b65be56720bac1ea9d80e9742217dee0405f0b4 /src/NotesService.js | |
parent | 1e54f549dc636c85de96b82e360d77df65c0a14c (diff) |
error handling: send errorType
Diffstat (limited to 'src/NotesService.js')
-rw-r--r-- | src/NotesService.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/NotesService.js b/src/NotesService.js index 4d166cf5..f949ea55 100644 --- a/src/NotesService.js +++ b/src/NotesService.js @@ -77,8 +77,8 @@ export const fetchNotes = () => { if (response.data.noteIds !== null) { store.dispatch('updateNotes', { noteIds: response.data.noteIds, notes: response.data.notesData }) } - if (response.data.errorMessage) { - showError(t('notes', 'Error from Nextcloud server: {msg}', { msg: response.data.errorMessage })) + if (response.data.error) { + showError(t('notes', 'Error from Nextcloud server: {msg}', { msg: response.data.errorType })) } else { store.commit('setSyncETag', response.headers.etag) store.commit('setSyncLastModified', response.headers['last-modified']) @@ -115,7 +115,7 @@ export const fetchNote = noteId => { console.error(err) const msg = t('notes', 'Fetching note {id} has failed.', { id: noteId }) store.commit('setNoteAttribute', { noteId, attribute: 'error', value: true }) - store.commit('setNoteAttribute', { noteId, attribute: 'errorMessage', value: msg }) + store.commit('setNoteAttribute', { noteId, attribute: 'errorType', value: msg }) return store.getter.getNote(noteId) } }) |