V
V
Vladislav Gubarev2021-10-17 11:34:16
React
Vladislav Gubarev, 2021-10-17 11:34:16

Unhandled Rejection (Error): [object Object] from Webpack in React?

After executing this function:

async addApp(){
        this.setState(produce(draft => {
            draft.preview.button.loading = true;
        }))
        let apps;
        await apiCall('me').then(res => {
            apps = res.data.preferences.apps + (res.data.preferences.apps === '' ? '' : ';') + this.state.preview.appId;
        })
        await apiCall('apps/setapps',{apps}).then(res => {
        this.getPreview(this.state.preview.appId)
            }).catch(err => {
                console.log(err)
            })
    }

An error pops up: Unhandled Rejection (Error): [object Object]
And the error is not from React, but from Webpack.
What could be the reason?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question