@sassoftware/sas-score-mcp-serverjs 0.3.7 → 0.3.8
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/package.json
CHANGED
|
@@ -16,10 +16,10 @@ async function _listLibrary(params ){
|
|
|
16
16
|
source: (server === 'sas') ? 'compute' : server,
|
|
17
17
|
table: null
|
|
18
18
|
};
|
|
19
|
-
|
|
19
|
+
let appControl;
|
|
20
20
|
try {
|
|
21
21
|
// setup request control
|
|
22
|
-
|
|
22
|
+
appControl = await restafedit.setup(
|
|
23
23
|
_appContext.logonPayload,
|
|
24
24
|
config
|
|
25
25
|
,null,{},'user',{}, {}, _appContext.storeConfig
|
|
@@ -48,7 +48,9 @@ async function _listLibrary(params ){
|
|
|
48
48
|
};
|
|
49
49
|
} catch (err) {
|
|
50
50
|
console.error(JSON.stringify(err));
|
|
51
|
-
|
|
51
|
+
if (appControl != null) {
|
|
52
|
+
await deleteSession(appControl);
|
|
53
|
+
}
|
|
52
54
|
return { isError: true, content: [{ type: 'text', text: JSON.stringify(err) }] };
|
|
53
55
|
}
|
|
54
56
|
}
|
|
@@ -41,6 +41,10 @@ async function igetLogonPayload(_appContext) {
|
|
|
41
41
|
|
|
42
42
|
// Use user supplied bearer token
|
|
43
43
|
if (_appContext.AUTHFLOW === "bearer") {
|
|
44
|
+
if (_appContext.bearerToken == null) {
|
|
45
|
+
console.error("[Error] AUTHFLOW set to bearer but no bearer token supplied");
|
|
46
|
+
return null;
|
|
47
|
+
}
|
|
44
48
|
console.error("[Note] Using user supplied bearer token ");
|
|
45
49
|
let logonPayload = {
|
|
46
50
|
host: _appContext.VIYA_SERVER,
|