@sasjs/adapter 3.10.5 → 3.10.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/index.js +2 -2
- package/node/index.js +2 -2
- package/package.json +1 -1
- package/src/request/RequestClient.ts +7 -0
package/package.json
CHANGED
|
@@ -703,7 +703,14 @@ const parseError = (data: string) => {
|
|
|
703
703
|
} catch (_) {}
|
|
704
704
|
|
|
705
705
|
try {
|
|
706
|
+
// There are some edge cases in which the SAS mp_abort macro
|
|
707
|
+
// (https://core.sasjs.io/mp__abort_8sas.html) is unable to
|
|
708
|
+
// provide a clean exit. In this case the JSON response will
|
|
709
|
+
// be wrapped in >>weboutBEGIN<< and >>weboutEND<< strings.
|
|
710
|
+
// Therefore, if the first string exists, we won't throw an
|
|
711
|
+
// error just yet (the parser may yet throw one instead)
|
|
706
712
|
const hasError =
|
|
713
|
+
!data?.match(/>>weboutBEGIN<</) &&
|
|
707
714
|
!!data?.match(/Stored Process Error/i) &&
|
|
708
715
|
!!data?.match(/This request completed with errors./i)
|
|
709
716
|
if (hasError) {
|