You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if(!datasetId)thrownewError('Dataset id cannot be null or empty. Please contact Relewise if you don\'t have an account already or would like a free demo license');
@@ -45,6 +46,9 @@ export abstract class RelewiseClient {
45
46
if(options?.serverUrl){
46
47
this._serverUrl=options.serverUrl;
47
48
}
49
+
if(options?.cache){
50
+
this.cache=options.cache;
51
+
}
48
52
}
49
53
50
54
publicgetserverUrl(): string{
@@ -64,26 +68,26 @@ export abstract class RelewiseClient {
thrownewProblemDetailsError(`Error when calling the Relewise API.\n\nTitle: ${response.statusText}\nStatus: ${response.status}\n${details}\nRead more in the details property if there is error response or look in the network tab.`,responseMessage);
81
85
}
82
86
83
87
returnawaitthis.parseJson<TResponse>(response);
84
88
85
89
}catch(err){
86
-
this.handleRequestError(err);
90
+
this.handleRequestError(err);
87
91
}
88
92
}
89
93
@@ -97,11 +101,50 @@ export abstract class RelewiseClient {
97
101
privatehandleRequestError(err: unknown): never{
98
102
if(errinstanceofProblemDetailsError)throwerr;
99
103
if(errinstanceofDOMException)throwerr;
100
-
101
-
console.error("Network error or preflight request failed. Check API Key and Dataset ID.");
102
-
thrownewError("Network error or preflight request failed. Check API Key and Dataset ID.");
0 commit comments