Skip to content

Commit

Permalink
Fix error handling in simulator.component.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
nicobytes committed Apr 15, 2024
1 parent eae7cf0 commit df2f3d7
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions apps/webapp/src/app/pages/simulator/simulator.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,6 @@ export default class SimulatorComponent implements OnInit {
this.mode.set('question');
},
error: () => {
const messageError = 'Ups, something went wrong with the transcription. Please try again.';
this.toastr.error(messageError, 'Error!');
this.mode.set('recording');
},
});
Expand All @@ -74,8 +72,9 @@ export default class SimulatorComponent implements OnInit {
this.answer.set(newMessage.text);
this.createFeedback(question, newMessage.text);
},
error: (error) => {
console.error(error);
error: () => {
const messageError = 'Ups, something went wrong with the transcription. Please try again.';
this.toastr.error(messageError, 'Error!');
this.mode.set('recording');
},
});
Expand Down

0 comments on commit df2f3d7

Please sign in to comment.