lib/axios/plugin.js
function onError(e) {
    if (!inBrowser) {
        return {};
    }

    let response = {};
    if (e.response) {
        response = e.response.data;
    }

    throw Object.assign({
        statusCode: 500,
        message: 'Request error'
    }, response);
}
function onError(e) {
    if (!inBrowser) {
        return {};
    }

    let response = {};
    if (e.response) {
        response = e.response.data;
    }

    throw Object.assign({
        statusCode: 500,
        message: 'Request error'
    }, response);
}
function onError ( e ) { if ( ! inBrowser ) { return { } ; } let response = { } ; if ( e . response ) { response = e . response . data ; } throw Object . assign ( { statusCode : 500 , message : 'Request error' } , response ) ; }
Throw nice http errors & keep SSR safe
Throw nice http errors & keep SSR safe