Integrate full instagram oauth
This commit is contained in:
@@ -24,12 +24,18 @@ export class Requester {
|
||||
headers: headers,
|
||||
body: body
|
||||
})
|
||||
.then(response => response.json())
|
||||
.then(async response => {
|
||||
if (!response.ok) {
|
||||
throw new Error(`HTTP ${response.status} ${response.statusText} : ${await response.text()}`);
|
||||
}
|
||||
return response.json()
|
||||
})
|
||||
.then(data => {
|
||||
return data;
|
||||
})
|
||||
.catch(error => {
|
||||
Logger.error(`Unable to fetch`, error);
|
||||
throw error;
|
||||
});
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user