Checking DNS resolution first
The main reason of failure for screenshots is the DNS resolution: the domain name cannot be mapped to an IP address. This happen when the URL is mistyped or if the domain is no longer registered. This problem is found and reported by the browser.
We have integrated the DNS resolution verification in the API calls (screenshot/create and screenshot/simple). If you request a screenshot for a domain that cannot be resolved, you will receive an error in return:
Error message in the dashboard |
{"status":"error","error":"Domain name cannot be resolved"}
Error returned by the API
This makes it easier for users to understand when the URL may have been mistyped. This will also make screenshots faster by elimination unnecessary requests.