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:
commit
466fc84e82
8 changed files with 52 additions and 79 deletions
|
@ -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 }) => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue