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' });