mirror of
https://github.com/sasjs/adapter.git
synced 2026-01-07 04:20:05 +00:00
Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d3d62f6888 | ||
| 22eca50e3f |
@@ -703,7 +703,14 @@ const parseError = (data: string) => {
|
|||||||
} catch (_) {}
|
} catch (_) {}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
// There are some edge cases in which the SAS mp_abort macro
|
||||||
|
// (https://core.sasjs.io/mp__abort_8sas.html) is unable to
|
||||||
|
// provide a clean exit. In this case the JSON response will
|
||||||
|
// be wrapped in >>weboutBEGIN<< and >>weboutEND<< strings.
|
||||||
|
// Therefore, if the first string exists, we won't throw an
|
||||||
|
// error just yet (the parser may yet throw one instead)
|
||||||
const hasError =
|
const hasError =
|
||||||
|
!data?.match(/>>weboutBEGIN<</) &&
|
||||||
!!data?.match(/Stored Process Error/i) &&
|
!!data?.match(/Stored Process Error/i) &&
|
||||||
!!data?.match(/This request completed with errors./i)
|
!!data?.match(/This request completed with errors./i)
|
||||||
if (hasError) {
|
if (hasError) {
|
||||||
|
|||||||
Reference in New Issue
Block a user