From 3d9b40398cf2a0ca1cb0368fde17170ca110aa0b Mon Sep 17 00:00:00 2001 From: Sabir Hassan Date: Mon, 30 Jan 2023 23:22:43 +0500 Subject: [PATCH] fix: improve error message when sasjs runner is not found --- src/request/RequestClient.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/request/RequestClient.ts b/src/request/RequestClient.ts index e1c42e0..9ed6ce8 100644 --- a/src/request/RequestClient.ts +++ b/src/request/RequestClient.ts @@ -691,7 +691,9 @@ const parseError = (data: string) => { const parts = data.split(/stored process not found: /i) if (parts.length > 1) { const storedProcessPath = parts[1].split('')[1].split('')[0] - const message = `Stored process not found: ${storedProcessPath}` + const message = storedProcessPath.endsWith('runner') + ? `SASJS runner not found. Here's the link (https://cli.sasjs.io/auth/#sasjs-runner) to sas code for registering sasjs runner` + : `Stored process not found: ${storedProcessPath}` return new JobExecutionError(500, message, '') } }