testaugnitoambientsdk
Advanced tools
Comparing version 2.0.9 to 2.1.0
{ | ||
"name": "testaugnitoambientsdk", | ||
"version": "2.0.9", | ||
"version": "2.1.0", | ||
"description": "Use this typescript SDK to integrate Augnito’s Ambient Tech within your EMR. To get access credentials or know more about how Augnito Ambient can benefit you, please visit our website and connect with our sales team: https://augnito.ai/", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -32,12 +32,3 @@ "use strict"; | ||
}); | ||
console.log(response); | ||
if (!response.ok) { | ||
if (response.status === 503) { | ||
return response.text().then(text => { | ||
var errorJson = JSON.parse(text); | ||
if (errorJson) { | ||
throw new Error(errorJson.ErrorMessage); | ||
} | ||
}); | ||
} | ||
throw new Error(`HTTP error! Status: ${response.status}`); | ||
@@ -44,0 +35,0 @@ } |
@@ -23,12 +23,3 @@ import AmbientConfig from "../config/AmbientConfig"; | ||
}); | ||
console.log(response); | ||
if (!response.ok) { | ||
if (response.status === 503) { | ||
return response.text().then(text => { | ||
var errorJson = JSON.parse(text); | ||
if(errorJson){ | ||
throw new Error(errorJson.ErrorMessage); | ||
} | ||
}); | ||
} | ||
throw new Error(`HTTP error! Status: ${response.status}`); | ||
@@ -35,0 +26,0 @@ } |
@@ -60,3 +60,14 @@ "use strict"; | ||
} | ||
return yield this._ambientRestAPI.FetchJob(JobId); | ||
var responseJson = yield this._ambientRestAPI.FetchJob(JobId); | ||
if (responseJson) { | ||
if (responseJson.Status === 200) { | ||
return responseJson; | ||
} | ||
else { | ||
this.onErrorCallback(responseJson.ErrorMessage); | ||
} | ||
} | ||
else { | ||
this.onErrorCallback("Unknown Error!"); | ||
} | ||
} | ||
@@ -63,0 +74,0 @@ catch (e) { |
@@ -69,3 +69,16 @@ import AmbientConfig from "./config/AmbientConfig"; | ||
} | ||
return await this._ambientRestAPI.FetchJob(JobId); | ||
var responseJson = await this._ambientRestAPI.FetchJob(JobId); | ||
if(responseJson) | ||
{ | ||
if(responseJson.Status === 200){ | ||
return responseJson; | ||
} | ||
else{ | ||
this.onErrorCallback(responseJson.ErrorMessage); | ||
} | ||
} | ||
else | ||
{ | ||
this.onErrorCallback("Unknown Error!"); | ||
} | ||
} | ||
@@ -72,0 +85,0 @@ catch(e:any){ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
63130
1399