aotrautils-srv 0.0.1363 → 0.0.1365

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.
@@ -1,6 +1,6 @@
1
1
 
2
2
 
3
- /*utils COMMONS library associated with aotra version : «1_29072022-2359 (12/04/2025-02:45:33)»*/
3
+ /*utils COMMONS library associated with aotra version : «1_29072022-2359 (12/04/2025-02:58:51)»*/
4
4
  /*-----------------------------------------------------------------------------*/
5
5
 
6
6
 
@@ -4898,7 +4898,7 @@ AOTRAUTILS_LIB_IS_LOADED=true;
4898
4898
 
4899
4899
 
4900
4900
 
4901
- /*utils AI library associated with aotra version : «1_29072022-2359 (12/04/2025-02:45:33)»*/
4901
+ /*utils AI library associated with aotra version : «1_29072022-2359 (12/04/2025-02:58:51)»*/
4902
4902
  /*-----------------------------------------------------------------------------*/
4903
4903
 
4904
4904
 
@@ -5015,7 +5015,8 @@ class OpenAIAPIClient{
5015
5015
  console.log("~~~~~~~~~~~assistantReply :",assistantReply);
5016
5016
 
5017
5017
  resolve(assistantReply);
5018
- }).catch(error => {
5018
+ }).catch(errorObj)=>{
5019
+ const error=errorObj.error, httpStatus=errorObj.httpStatus;
5019
5020
  // TRACE
5020
5021
  console.error("Error:", error);
5021
5022
  reject(error);
@@ -5042,7 +5043,7 @@ getOpenAIAPIClient=(modelName, apiURL, agentRole, defaultPrompt)=>{
5042
5043
 
5043
5044
 
5044
5045
 
5045
- /*utils SERVER library associated with aotra version : «1_29072022-2359 (12/04/2025-02:45:33)»*/
5046
+ /*utils SERVER library associated with aotra version : «1_29072022-2359 (12/04/2025-02:58:51)»*/
5046
5047
  /*-----------------------------------------------------------------------------*/
5047
5048
 
5048
5049
 
@@ -6822,7 +6823,7 @@ performHTTPRequest=function(completeURL,httpMethod="GET",headers={},requestBodyO
6822
6823
  const error=nonull(data.error, data.detail);
6823
6824
  // TRACE
6824
6825
  console.error("Error:", error);
6825
- reject(""+error, status);
6826
+ reject({error:""+error, httpStatus:status});
6826
6827
  return;
6827
6828
  }
6828
6829
 
@@ -6833,7 +6834,7 @@ performHTTPRequest=function(completeURL,httpMethod="GET",headers={},requestBodyO
6833
6834
  }).catch(error => {
6834
6835
  // TRACE
6835
6836
  console.error("Error:", error);
6836
- reject(`${error}`, null);
6837
+ reject({error:`${error}`, httpStatus:null});
6837
6838
  });
6838
6839
  });
6839
6840
  }// else :
@@ -6900,7 +6901,7 @@ performHTTPRequest=function(completeURL,httpMethod="GET",headers={},requestBodyO
6900
6901
  const error=nonull(response.statusMessage, "No error message for error code "+status);
6901
6902
  // TRACE
6902
6903
  console.error("Error:", error);
6903
- reject(""+error, status);
6904
+ reject({error:""+error, httpStatus:status});
6904
6905
  return;
6905
6906
  }
6906
6907
 
@@ -6917,7 +6918,7 @@ performHTTPRequest=function(completeURL,httpMethod="GET",headers={},requestBodyO
6917
6918
 
6918
6919
  // Handle errors
6919
6920
  request.on("error", (error) => {
6920
- reject(error);
6921
+ reject({error:error, httpStatus:null});
6921
6922
  });
6922
6923
 
6923
6924
 
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aotrautils-srv",
3
- "version": "0.0.1363",
3
+ "version": "0.0.1365",
4
4
  "main": "aotrautils-srv.build.js",
5
5
  "description": "A library for vanilla javascript utils (server-side) used in aotra javascript CMS",
6
6
  "author": "Jeremie Ratomposon <info@alqemia.com> (https://alqemia.com)",