RBC interview question

How to handle CORS error