@sasjs/core 4.59.3 → 4.59.4

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.
@@ -148,6 +148,6 @@ data _null_;
148
148
  run;
149
149
 
150
150
  /* END */
151
- %put &sysmacroname took %sysevalf(%sysfunc(datetime())-&dttm) seconds to run;
151
+ *%put &sysmacroname took %sysevalf(%sysfunc(datetime())-&dttm) seconds to run;
152
152
 
153
153
  %mend mp_replace;
package/package.json CHANGED
@@ -32,5 +32,5 @@
32
32
  "lint": "npx @sasjs/cli lint",
33
33
  "prepare": "git rev-parse --git-dir && git config core.hooksPath ./.git-hooks || true"
34
34
  },
35
- "version": "4.59.3"
35
+ "version": "4.59.4"
36
36
  }
@@ -114,6 +114,17 @@ options noquotelenmax;
114
114
  headers "Authorization"="Bearer &&&access_token_var";
115
115
  %end;
116
116
  run;
117
+ %if &SYS_PROCHTTP_STATUS_CODE=401 %then %do;
118
+ /* relates to: https://github.com/sasjs/core/issues/400 */
119
+ %put 401 thrown in &sysmacroname;
120
+ %put sleeping: %sysfunc(sleep(10,1)) - will try once more;
121
+ proc http method='GET' out=&fname1 &oauth_bearer
122
+ url="&base_uri/folders/folders/@item?path=&newpath";
123
+ %if &grant_type=authorization_code %then %do;
124
+ headers "Authorization"="Bearer &&&access_token_var";
125
+ %end;
126
+ run;
127
+ %end;
117
128
  %local libref1;
118
129
  %let libref1=%mf_getuniquelibref();
119
130
  libname &libref1 JSON fileref=&fname1;
@@ -121,7 +132,7 @@ options noquotelenmax;
121
132
  iftrue=(
122
133
  &SYS_PROCHTTP_STATUS_CODE ne 200 and &SYS_PROCHTTP_STATUS_CODE ne 404
123
134
  )
124
- ,mac=&sysmacroname
135
+ ,mac=mv_createfolder124
125
136
  ,msg=%str(&SYS_PROCHTTP_STATUS_CODE &SYS_PROCHTTP_STATUS_PHRASE)
126
137
  )
127
138
  %if &mdebug=1 %then %do;