Skip to content

Commit d1643de

Browse files
committed
Merge pull request #32 from yllieth/remove_deduplicate_of_upload_errors
remove deduplicate of upload errors (because of CORS constraint)
2 parents d6bd6fa + cf790b2 commit d1643de

7 files changed

+10
-14
lines changed

bower.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "predicsis_ml_sdk-javascript",
3-
"version": "0.7.1",
3+
"version": "0.7.2",
44
"authors": [
55
"Yllieth <[email protected]>",
66
"Dehau"

dist/predicsis-jsSDK.js

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,7 @@ angular
3535
Restangular.setBaseUrl(this.getBaseUrl());
3636
Restangular.setDefaultHeaders(requestHeaders);
3737
Restangular.setErrorInterceptor(function(response) {
38-
if (response.config.headers === undefined || response.config.headers['X-CLIENT-NOTIFY-ERROR'] !== false) {
39-
errorHandler(response);
40-
}
38+
errorHandler(response);
4139
});
4240
Jobs.setErrorHandler(function(err) {
4341
// Normalize with restangular errors
@@ -3072,7 +3070,7 @@ angular
30723070
* @return {Promise} An object containing a part_url field (PUT part presigned url)
30733071
*/
30743072
this.getPartUrl = function(id, partNumber, path) {
3075-
return upload(id).get({ part_number: partNumber, path: path }, {'X-CLIENT-NOTIFY-ERROR': false});
3073+
return upload(id).get({ part_number: partNumber, path: path });
30763074
};
30773075

30783076
/**
@@ -3083,7 +3081,7 @@ angular
30833081
* @return {Promise} resolve when upload is completed
30843082
*/
30853083
this.complete = function(id, path) {
3086-
return upload(id).patch({ path: path }, {}, {'X-CLIENT-NOTIFY-ERROR': false});
3084+
return upload(id).patch({ path: path }, {});
30873085
};
30883086

30893087
});

dist/predicsis-jsSDK.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/predicsis-jsSDK.min.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/model/Uploads.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ angular
7171
* @return {Promise} An object containing a part_url field (PUT part presigned url)
7272
*/
7373
this.getPartUrl = function(id, partNumber, path) {
74-
return upload(id).get({ part_number: partNumber, path: path }, {'X-CLIENT-NOTIFY-ERROR': false});
74+
return upload(id).get({ part_number: partNumber, path: path });
7575
};
7676

7777
/**
@@ -82,7 +82,7 @@ angular
8282
* @return {Promise} resolve when upload is completed
8383
*/
8484
this.complete = function(id, path) {
85-
return upload(id).patch({ path: path }, {}, {'X-CLIENT-NOTIFY-ERROR': false});
85+
return upload(id).patch({ path: path }, {});
8686
};
8787

8888
});

lib/predicsis-jsSDK.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,7 @@ angular
3535
Restangular.setBaseUrl(this.getBaseUrl());
3636
Restangular.setDefaultHeaders(requestHeaders);
3737
Restangular.setErrorInterceptor(function(response) {
38-
if (response.config.headers === undefined || response.config.headers['X-CLIENT-NOTIFY-ERROR'] !== false) {
39-
errorHandler(response);
40-
}
38+
errorHandler(response);
4139
});
4240
Jobs.setErrorHandler(function(err) {
4341
// Normalize with restangular errors

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "predicsis_ml_sdk-javascript",
3-
"version": "0.7.1",
3+
"version": "0.7.2",
44
"description": "Javascript SDK for PredicSis ML API",
55
"main": "index.js",
66
"scripts": {

0 commit comments

Comments
 (0)