mirror of
https://github.com/sasjs/adapter.git
synced 2026-01-18 17:40:06 +00:00
fix: check for valid json while parsing sas viya debug response
This commit is contained in:
@@ -75,9 +75,7 @@ export class FileUploader {
|
|||||||
this.requestClient,
|
this.requestClient,
|
||||||
this.sasjsConfig.serverUrl
|
this.sasjsConfig.serverUrl
|
||||||
)
|
)
|
||||||
return typeof jsonResponse === 'string'
|
return jsonResponse
|
||||||
? getValidJson(jsonResponse)
|
|
||||||
: jsonResponse
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return typeof res.result === 'string'
|
return typeof res.result === 'string'
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import { RequestClient } from '../request/RequestClient'
|
import { RequestClient } from '../request/RequestClient'
|
||||||
|
import { getValidJson } from '../utils'
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* When querying a Viya job using the Web approach (as opposed to using the APIs) with _DEBUG enabled,
|
* When querying a Viya job using the Web approach (as opposed to using the APIs) with _DEBUG enabled,
|
||||||
@@ -25,5 +26,5 @@ export const parseSasViyaDebugResponse = async (
|
|||||||
|
|
||||||
return requestClient
|
return requestClient
|
||||||
.get(serverUrl + jsonUrl, undefined)
|
.get(serverUrl + jsonUrl, undefined)
|
||||||
.then((res) => res.result)
|
.then((res: any) => getValidJson(res.result))
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user