Skip to content

Instantly share code, notes, and snippets.

View dnh33's full-sized avatar
👁️
building

dnh33

👁️
building
  • 20:28 (UTC +02:00)
View GitHub Profile
@dnh33
dnh33 / csharp.gitignore
Created July 25, 2022 15:07 — forked from takekazuomi/csharp.gitignore
.gitignore for C#
## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.
# User-specific files
*.suo
*.user
*.sln.docstates
# Build results
@dnh33
dnh33 / axios-catch-error.js
Created November 8, 2021 03:52 — 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 😨