1
0
mirror of https://github.com/sasjs/adapter.git synced 2026-01-09 05:20:05 +00:00

fix: running request with access_token fails

This commit is contained in:
Mihajlo Medjedovic
2020-09-11 18:46:04 +02:00
parent 3cff286c57
commit 23bdeaafaf
3 changed files with 12 additions and 2 deletions

View File

@@ -17,6 +17,7 @@ export async function makeRequest<T>(
? (res: Response) => res.json()
: (res: Response) => res.text()
let etag = null
const result = await fetch(url, request).then(async (response) => {
if (response.redirected && response.url.includes('SASLogon/login')) {
return Promise.reject({ status: 401 })