Verint Interview Question

How to handle errors and what are better ways to handle API responses?