[Front-end] Came up with a prototype to handle any errors.