1
0
Fork 0
mirror of synced 2024-10-02 18:16:29 +13:00

failing API calls now display errors using the toast

This commit is contained in:
Keviin Åberg Kultalahti 2021-01-22 13:27:13 +01:00
parent 598f58bb63
commit 73b2a775aa

View file

@ -1,3 +1,5 @@
import { notificationStore } from "../store/notification"
/**
* API cache for cached request responses.
*/
@ -7,6 +9,7 @@ let cache = {}
* Handler for API errors.
*/
const handleError = error => {
notificationStore.danger(error)
return { error }
}