Skip to content

Commit df2f3d7

Browse files
committed
Fix error handling in simulator.component.ts
1 parent eae7cf0 commit df2f3d7

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

Diff for: apps/webapp/src/app/pages/simulator/simulator.component.ts

+3-4
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,6 @@ export default class SimulatorComponent implements OnInit {
5858
this.mode.set('question');
5959
},
6060
error: () => {
61-
const messageError = 'Ups, something went wrong with the transcription. Please try again.';
62-
this.toastr.error(messageError, 'Error!');
6361
this.mode.set('recording');
6462
},
6563
});
@@ -74,8 +72,9 @@ export default class SimulatorComponent implements OnInit {
7472
this.answer.set(newMessage.text);
7573
this.createFeedback(question, newMessage.text);
7674
},
77-
error: (error) => {
78-
console.error(error);
75+
error: () => {
76+
const messageError = 'Ups, something went wrong with the transcription. Please try again.';
77+
this.toastr.error(messageError, 'Error!');
7978
this.mode.set('recording');
8079
},
8180
});

0 commit comments

Comments
 (0)