Merge branch 'fix/fix-error-handling-in-profile-tab' into 'develop'

fix #1020 fix error handling in profile tab

Closes #1020

See merge request pleroma/pleroma-fe!1299
This commit is contained in:
Shpuld Shpludson 2020-12-16 16:51:03 +00:00
commit 466fc84e82
8 changed files with 52 additions and 79 deletions

View file

@ -162,7 +162,12 @@ const updateProfileImages = ({ credentials, avatar = null, banner = null, backgr
body: form
})
.then((data) => data.json())
.then((data) => parseUser(data))
.then((data) => {
if (data.error) {
throw new Error(data.error)
}
return parseUser(data)
})
}
const updateProfile = ({ credentials, params }) => {