1
0
mirror of https://github.com/sasjs/adapter.git synced 2026-01-07 12:30:06 +00:00

fix: throw error from parseWeboutResponse function if unable to find webout response

This commit is contained in:
2021-08-18 16:33:26 +05:00
parent e72195ca5d
commit 3c9f133374
2 changed files with 7 additions and 8 deletions

View File

@@ -114,13 +114,9 @@ export class WebJobExecutor extends BaseJobExecutor {
resolve(jsonResponse)
}
if (this.serverType === ServerType.Sas9 && config.debug) {
let jsonResponse
if (typeof res.result === 'string') {
jsonResponse = parseWeboutResponse(res.result)
if (jsonResponse === '') throw new WeboutResponseError(apiUrl)
} else {
jsonResponse = res.result
}
let jsonResponse = res.result
if (typeof res.result === 'string')
jsonResponse = parseWeboutResponse(res.result, apiUrl)
getValidJson(jsonResponse)
this.appendRequest(res, sasJob, config.debug)