Fynd interview question

Fetch an api in javascript how to debug if a website is down