@sasjs/adapter 4.1.4 → 4.1.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -84,5 +84,5 @@
84
84
  "https": "1.0.0",
85
85
  "tough-cookie": "4.0.0"
86
86
  },
87
- "version": "4.1.4"
87
+ "version": "4.1.6"
88
88
  }
@@ -239,7 +239,7 @@ export class AuthManager {
239
239
  }
240
240
 
241
241
  const { result: formResponse } = await this.requestClient.get<string>(
242
- this.loginUrl.replace('.do', ''),
242
+ this.loginUrl.replace('/SASLogon/login.do', '/SASLogon/login'),
243
243
  undefined,
244
244
  'text/plain'
245
245
  )
@@ -348,7 +348,7 @@ export class AuthManager {
348
348
  this.loginUrl =
349
349
  this.serverType === ServerType.SasViya
350
350
  ? tempLoginLink
351
- : loginUrl.replace('.do', '')
351
+ : loginUrl.replace('/SASLogon/login.do', '/SASLogon/login')
352
352
  }
353
353
  }
354
354
 
@@ -4,6 +4,7 @@ import axiosCookieJarSupport from 'axios-cookiejar-support'
4
4
  import * as tough from 'tough-cookie'
5
5
  import { prefixMessage } from '@sasjs/utils/error'
6
6
  import { RequestClient, throwIfError } from './RequestClient'
7
+ import { JobExecutionError } from '../types/errors'
7
8
 
8
9
  /**
9
10
  * Specific request client for SAS9 in Node.js environments.
@@ -69,6 +70,8 @@ export class Sas9RequestClient extends RequestClient {
69
70
  return this.parseResponse<T>(response)
70
71
  })
71
72
  .catch(async (e: any) => {
73
+ if (e instanceof JobExecutionError) throw e
74
+
72
75
  return await this.handleError(
73
76
  e,
74
77
  () =>