Skip to content

Instantly share code, notes, and snippets.

View resmall's full-sized avatar

Tiago R. Lammers resmall

View GitHub Profile
@resmall
resmall / 0_reuse_code.js
Created October 21, 2015 15:25
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@resmall
resmall / README.md
Created December 2, 2015 13:42 — forked from hofmannsven/README.md
My simply Git Cheatsheet
@resmall
resmall / axios-catch-error.js
Created October 10, 2019 20:19 — forked from fgilio/axios-catch-error.js
Catch request errors with Axios
/*
* Handling Errors using async/await
* Has to be used inside an async function
*/
try {
const response = await axios.get('https://your.site/api/v1/bla/ble/bli');
// Success 🎉
console.log(response);
} catch (error) {
// Error 😨