diff --git a/error.html b/error.html new file mode 100644 index 0000000..235b2bf --- /dev/null +++ b/error.html @@ -0,0 +1,46 @@ + + + + + + + UDlink Docs + + + + + + + + + + + + + + + + + + + + +
+

Hi! Something went wrong, here's some more information:

+

+
+
+ + + + Alchemy Supercharged + + + + + \ No newline at end of file diff --git a/error.js b/error.js new file mode 100644 index 0000000..209b2ba --- /dev/null +++ b/error.js @@ -0,0 +1,33 @@ +const info = document.getElementById("error-info"); +const urlParams = new URLSearchParams(window.location.search); +const error = urlParams.get("e") || undefined; + +if (error === undefined) { + window.location.replace("https://docs.udl.ink/"); +} else { + if (error == "tokenid") { + const domain = urlParams.get("domain"); + info.innerHTML = + `The Unstoppable Domains API did not return a token ID
+ for that domain: ${domain}. You might want to search for the domain
+ directly on Etherscan / Opensea / Polygonscan.`; + } else if (error == "gateway") { + const gateway = urlParams.get("gateway"); + info.innerHTML = + `Invalid IPFS Gateway selected for redirect: ${gateway}
+ Check available gateways on the homepage.`; + } else if (error == "tld") { + const domain = urlParams.get("domain"); + info.innerHTML = + `Invalid Unstoppable Domains TLD, requested domain: ${domain}
+ Check the domain and try again.`; + } else if (error == "nohash") { + const domain = urlParams.get("domain"); + info.innerHTML = + `No linked IPFS hash for the requested domain: ${domain}
+ Check the domain or the Unstoppabe Dashboard and try again.`; + } else { + info.innerHTML = + `Sorry, we're not sure what happened, please try again.`; + } +}