@edgeiq/edgeiq-api-js 1.5.2 → 1.5.3
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/dist/constants.d.ts
CHANGED
package/dist/constants.js
CHANGED
|
@@ -22,6 +22,7 @@ exports.ResponseErrorsNames = {
|
|
|
22
22
|
unEditableIntegration: 'Uneditable Integration type',
|
|
23
23
|
integrationMissinValues: 'Integration missing required values',
|
|
24
24
|
createError: 'Unable to create resource',
|
|
25
|
+
validationError: 'Unable to validate resource',
|
|
25
26
|
unexpected: 'Unexpected error',
|
|
26
27
|
deviceLocationMissingValues: 'Device location observation missing required values',
|
|
27
28
|
};
|
|
@@ -88,6 +88,9 @@ var handleOtherErrors = function (error) {
|
|
|
88
88
|
error.response.data = error.response.data.messages.join('\n');
|
|
89
89
|
return Promise.reject(createError(error.response.data, constants_1.ResponseErrorsNames.deviceConfig));
|
|
90
90
|
}
|
|
91
|
+
else if (error.response.data.error === constants_1.ResponseErrorsNames.validationError) {
|
|
92
|
+
return Promise.reject(createError(error.response.data.messages.join('\n'), constants_1.ResponseErrorsNames.validationError));
|
|
93
|
+
}
|
|
91
94
|
action = constants_1.MethodsActions.put;
|
|
92
95
|
break;
|
|
93
96
|
case 'post':
|