1
0
mirror of https://github.com/sasjs/adapter.git synced 2026-01-08 04:50:06 +00:00

chore(deps): fix issues after deps bump

This commit is contained in:
Yury Shkoda
2022-01-31 10:20:05 +03:00
parent a39f9bb7e8
commit 0633a6de84
5 changed files with 25 additions and 263 deletions

View File

@@ -272,7 +272,13 @@ export async function executeScript(
return { result: jobResult?.result, log }
} catch (e) {
if (e && e.status === 404) {
interface HttpError {
status: number
}
const error = e as HttpError
if (error.status === 404) {
return executeScript(
requestClient,
sessionManager,
@@ -287,7 +293,7 @@ export async function executeScript(
true
)
} else {
throw prefixMessage(e, 'Error while executing script. ')
throw prefixMessage(e as Error, 'Error while executing script. ')
}
}
}

View File

@@ -1,6 +1,6 @@
import * as https from 'https'
import { AxiosRequestConfig } from 'axios'
import axiosCookieJarSupport from 'axios-cookiejar-support'
import * as axiosCookieJarSupport from 'axios-cookiejar-support'
import * as tough from 'tough-cookie'
import { prefixMessage } from '@sasjs/utils/error'
import { RequestClient, throwIfError } from './RequestClient'
@@ -17,7 +17,7 @@ export class Sas9RequestClient extends RequestClient {
status >= 200 && status < 303
if (axiosCookieJarSupport) {
axiosCookieJarSupport(this.httpClient)
axiosCookieJarSupport.wrapper(this.httpClient)
this.httpClient.defaults.jar = new tough.CookieJar()
}
}

View File

@@ -423,7 +423,7 @@ describe('ContextManager', () => {
true
)
} catch (error) {
editError = error
editError = error as Error
}
await expect(
@@ -542,7 +542,7 @@ describe('ContextManager', () => {
true
)
} catch (error) {
deleteError = error
deleteError = error as Error
}
await expect(