cisco-perfmon 1.3.0 → 1.3.1
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/main.js +14 -2
- package/package.json +1 -1
package/main.js
CHANGED
|
@@ -205,8 +205,20 @@ class perfMonService {
|
|
|
205
205
|
reject(promiseResults);
|
|
206
206
|
}
|
|
207
207
|
} else {
|
|
208
|
-
|
|
209
|
-
|
|
208
|
+
// Error checking. If the response contains a fault, we return the fault.
|
|
209
|
+
if (keyExists(output, "Fault")) {
|
|
210
|
+
if (output.Body.Fault.faultcode.includes("RateControl")) {
|
|
211
|
+
promiseResults.Results = { faultcode: "RateControl", faultstring: output.Body.Fault.faultstring };
|
|
212
|
+
} else if (output.Body.Fault.faultcode.includes("generalException")) {
|
|
213
|
+
promiseResults.Results = { faultcode: "generalException", faultstring: output.Body.Fault.faultstring };
|
|
214
|
+
} else {
|
|
215
|
+
promiseResults.Results = { faultcode: output.Body.Fault.faultcode, faultstring: output.Body.Fault.faultstring };
|
|
216
|
+
}
|
|
217
|
+
resolve(promiseResults);
|
|
218
|
+
} else {
|
|
219
|
+
// Error unknown. Return the response status instead.
|
|
220
|
+
reject(response.status);
|
|
221
|
+
}
|
|
210
222
|
}
|
|
211
223
|
} catch (e) {
|
|
212
224
|
promiseResults.Results = e;
|