From e8c308adf8ffbe0d85190fc9204999319bf56adc Mon Sep 17 00:00:00 2001 From: sanchezvem Date: Thu, 14 May 2026 14:37:44 +0100 Subject: [PATCH] Changed errors messages --- src/app/components/profil-form/profil-form.component.ts | 4 ++-- src/app/pages/home/home.component.ts | 2 +- src/app/pages/login/login.component.ts | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/app/components/profil-form/profil-form.component.ts b/src/app/components/profil-form/profil-form.component.ts index b0b4cd7..abeb9e2 100644 --- a/src/app/components/profil-form/profil-form.component.ts +++ b/src/app/components/profil-form/profil-form.component.ts @@ -90,9 +90,9 @@ export class ProfilFormComponent implements OnInit { await loading2.dismiss(); await toast.present(); - } catch { + } catch(e) { const toast = await this.toastCtrl.create({ - message: 'Modification impossible', + message: e.error ?? 'Modification impossible', duration: 2000, color: 'danger' }); diff --git a/src/app/pages/home/home.component.ts b/src/app/pages/home/home.component.ts index 24005f4..6cd9743 100644 --- a/src/app/pages/home/home.component.ts +++ b/src/app/pages/home/home.component.ts @@ -99,7 +99,7 @@ export class HomeComponent implements OnInit { this.groups.set(groups); } catch { const toast = await this.toastCtrl.create({ - message: 'Impossible de générer un défi aléatoire', + message: 'Impossible de générer un défi', duration: 2000, color: 'danger' }); diff --git a/src/app/pages/login/login.component.ts b/src/app/pages/login/login.component.ts index c593897..c98cfcf 100644 --- a/src/app/pages/login/login.component.ts +++ b/src/app/pages/login/login.component.ts @@ -104,7 +104,7 @@ export class LoginComponent implements OnInit { return true; } catch (e) { const toast = await this.toastCtrl.create({ - message: 'Email ou mot de passe incorrect', + message: e.error ?? 'Email ou mot de passe incorrect', duration: 2000, color: 'danger' });