mirror of
https://github.com/sasjs/adapter.git
synced 2025-12-11 01:14:36 +00:00
fix: throw error as it is in sas9RequestClient when its an instance of JobExecutionError
This commit is contained in:
@@ -4,6 +4,7 @@ import axiosCookieJarSupport from 'axios-cookiejar-support'
|
||||
import * as tough from 'tough-cookie'
|
||||
import { prefixMessage } from '@sasjs/utils/error'
|
||||
import { RequestClient, throwIfError } from './RequestClient'
|
||||
import { JobExecutionError } from '../types/errors'
|
||||
|
||||
/**
|
||||
* Specific request client for SAS9 in Node.js environments.
|
||||
@@ -69,6 +70,8 @@ export class Sas9RequestClient extends RequestClient {
|
||||
return this.parseResponse<T>(response)
|
||||
})
|
||||
.catch(async (e: any) => {
|
||||
if (e instanceof JobExecutionError) throw e
|
||||
|
||||
return await this.handleError(
|
||||
e,
|
||||
() =>
|
||||
|
||||
Reference in New Issue
Block a user