import axios from 'axios'; import {notifier} from './util'; // Fetch some missing information axios.get('/api/articles/not-found').then(resp => { // So something with product information }).catch(error => { // 404 - Product not found error if (error.status === 404) { notifier.error('The requested article does not exists or it has been deleted') } if (error.status === 401) { notifier.error('Please login to view this article') } })