Change 403 messaging
This commit is contained in:
parent
7b1d5a4f5c
commit
13fc2612ae
6 changed files with 45 additions and 6 deletions
|
@ -532,13 +532,19 @@ const fetchTimeline = ({
|
|||
|
||||
return fetch(url, { headers: authHeaders(credentials) })
|
||||
.then((data) => {
|
||||
if (data.ok) {
|
||||
if (data.ok || data.status === 403) {
|
||||
return data
|
||||
}
|
||||
throw new Error('Error fetching timeline', data)
|
||||
})
|
||||
.then((data) => data.json())
|
||||
.then((data) => data.map(isNotifications ? parseNotification : parseStatus))
|
||||
.then((data) => {
|
||||
if (!data.error) {
|
||||
return data.map(isNotifications ? parseNotification : parseStatus)
|
||||
} else {
|
||||
return data
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
const fetchPinnedStatuses = ({ id, credentials }) => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue