Skip to content
Snippets Groups Projects
Commit f060155f authored by Angelina Filippova's avatar Angelina Filippova
Browse files

Fix displaying errors with html content

parent 0cde91e4
Branches
Tags
1 merge request!54Redesign emoji packs and move it to settings
......@@ -15,9 +15,12 @@ service.interceptors.response.use(
// If there's an "error" property in the json, use it
const edata = error.response.data.error ? error.response.data.error : error.response.data
const message = !error.response.headers['content-type'].includes('application/json')
? `${error.message}`
: `${error.message} - ${edata}`
Message({
message: `${error.message} - ${edata}`,
message,
type: 'error',
duration: 5 * 1000
})
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment