Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Open Stackoverflow auto when your request fail
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