Skip to content

Instantly share code, notes, and snippets.

@evtuhovdo
evtuhovdo / grafana_telegram_bot.md
Created August 8, 2022 03:31 — forked from ilap/grafana_telegram_bot.md
Grafana Telegram Alert

Config Telegrambot for grafana's alerts.

1. Create bot

Open Telegram and search for @BotFather user and message them the following:

You
/newbot 

BotFather
@evtuhovdo
evtuhovdo / axios-catch-error.js
Created August 29, 2019 10:53 — 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 😨