Created
November 25, 2021 10:29
-
-
Save KevinPy/414aac942cd2f73405d9343a13e60cdf to your computer and use it in GitHub Desktop.
Open Stackoverflow auto when your request fail
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
try { | |
// Do something | |
} | |
catch (error) { | |
const url = `https://stackoverflow.com/search?q=[js]+${error.message}`; | |
window.open(url, '_blank'); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment