Created
October 12, 2016 21:45
-
-
Save mikehow1984/fff732fc09d0cfb587c9c8b5ac4e18ce to your computer and use it in GitHub Desktop.
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
function errorHandler(err){ | |
try{ | |
JSON.parse(err); | |
console.error(`Error: ${JSON.stringify(err)}`); | |
} catch(e){ | |
console.error(`Error: ${err}`); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment