1
0
mirror of https://github.com/sasjs/adapter.git synced 2026-04-21 21:21:31 +00:00

fix: check for valid json while parsing sas viya debug response

This commit is contained in:
2021-08-18 00:04:30 +05:00
parent 0bc69401e5
commit 8464e506e0
2 changed files with 3 additions and 4 deletions
+1 -3
View File
@@ -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'
+2 -1
View File
@@ -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))
} }