@sasjs/core 7.1.17 → 7.1.18

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
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@sasjs/core",
3
3
  "description": "Production-quality MIT-licensed SAS macro library (mf_*, mp_*, mm* macros) for SAS 9 and Viya application development",
4
- "version": "7.1.17",
4
+ "version": "7.1.18",
5
5
  "license": "MIT",
6
6
  "keywords": [
7
7
  "SAS",
@@ -8,6 +8,8 @@
8
8
 
9
9
  A root with nothing to list - an empty folder, or an answer that carries no
10
10
  members link - still yields &outds, with the documented columns and zero rows.
11
+ A non-200 HTTP response aborts with the HTTP status rather than being
12
+ interpreted as an empty listing.
11
13
 
12
14
 
13
15
  @param [in] root= (/) The path for which to return the list of folders
@@ -85,6 +87,10 @@ options noquotelenmax;
85
87
  headers "Authorization"="Bearer &&&access_token_var";
86
88
  %end;
87
89
  run;
90
+ %mp_abort(iftrue=(&SYS_PROCHTTP_STATUS_CODE ne 200)
91
+ ,mac=&sysmacroname
92
+ ,msg=%str(Root folders: &SYS_PROCHTTP_STATUS_CODE &SYS_PROCHTTP_STATUS_PHRASE)
93
+ )
88
94
  libname &libref1 JSON fileref=&fname1;
89
95
  /* an empty collection produces no items dataset at all, so a straight SET
90
96
  would fail with "File ...ITEMS.DATA does not exist" and leave syscc dirty */
@@ -130,6 +136,10 @@ options noquotelenmax;
130
136
  headers "Authorization"="Bearer &&&access_token_var";
131
137
  %end;
132
138
  run;
139
+ %mp_abort(iftrue=(&SYS_PROCHTTP_STATUS_CODE ne 200)
140
+ ,mac=&sysmacroname
141
+ ,msg=%str(Folder lookup: &SYS_PROCHTTP_STATUS_CODE &SYS_PROCHTTP_STATUS_PHRASE)
142
+ )
133
143
  /*data _null_;infile &fname1;input;putlog _infile_;run;*/
134
144
  libname &libref1 JSON fileref=&fname1;
135
145
  /* now get the followon link to list members */
@@ -175,6 +185,10 @@ options noquotelenmax;
175
185
  headers "Authorization"="Bearer &&&access_token_var";
176
186
  %end;
177
187
  run;
188
+ %mp_abort(iftrue=(&SYS_PROCHTTP_STATUS_CODE ne 200)
189
+ ,mac=&sysmacroname
190
+ ,msg=%str(Folder members: &SYS_PROCHTTP_STATUS_CODE &SYS_PROCHTTP_STATUS_PHRASE)
191
+ )
178
192
  libname &libref2 JSON fileref=&fname2;
179
193
  /* an emptied folder produces no items dataset at all, so a straight SET would
180
194
  fail with "File ...ITEMS.DATA does not exist" and leave syscc dirty */