From 778dda1ccd27d266a0191d2e226c957054d0a85f Mon Sep 17 00:00:00 2001 From: Dani Palou Date: Wed, 8 May 2024 11:18:43 +0200 Subject: [PATCH] MOBILE-4470 notes: Fix error message when synchronizing --- src/addons/notes/services/notes-sync.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/addons/notes/services/notes-sync.ts b/src/addons/notes/services/notes-sync.ts index 8d20bcb8d..bfe3aecd2 100644 --- a/src/addons/notes/services/notes-sync.ts +++ b/src/addons/notes/services/notes-sync.ts @@ -25,6 +25,8 @@ import { AddonNotesDBRecord, AddonNotesDeletedDBRecord } from './database/notes' import { AddonNotes, AddonNotesCreateNoteData } from './notes'; import { AddonNotesOffline } from './notes-offline'; import { CoreArray } from '@singletons/array'; +import { CoreAnyError } from '@classes/errors/error'; +import { CoreTextUtils } from '@services/utils/text'; /** * Service to sync notes. @@ -154,7 +156,7 @@ export class AddonNotesSyncProvider extends CoreSyncBaseProvider[] = []; // Format the notes to be sent. @@ -233,7 +235,7 @@ export class AddonNotesSyncProvider extends CoreSyncBaseProvider Translate.instant('addon.notes.warningnotenotsent', { course: 'fullname' in course ? course.fullname : courseId, // @deprecated since 4.3. - error: error, + error: CoreTextUtils.getErrorMessageFromError(error), })); }