Change naming, make more general

This commit is contained in:
Wyatt Benno 2019-12-09 09:02:34 +09:00
parent 01855f315c
commit e86af0c965
5 changed files with 17 additions and 20 deletions

View file

@ -532,10 +532,7 @@ const fetchTimeline = ({
return fetch(url, { headers: authHeaders(credentials) })
.then((data) => {
if (data.ok || data.status === 403) {
return data
}
throw new Error('Error fetching timeline', data)
return data
})
.then((data) => data.json())
.then((data) => {