kyohei's blog

profile picture
Written by Kyohei Tsukuda who lives and works in Tokyo 🇯🇵 , building useful things 🔧.
email / facebook / X / GitHub

1 pages tagged with "axios"

axiosのエラーハンドリング

October 20, 2021 - 316 words - 2 mins
TL; DR: import axios, { AxiosError } from 'axios'; try { await axios.get('...'); } catch (e) { if ((e as AxiosError).isAxiosError && e.response) { // axiosのエラー thr… read more