@dile/crud 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.
@@ -95,35 +95,31 @@ export class DileAjax extends DileAxios(DileI18nMixin(LitElement)) {
95
95
  this.dispatchError(res.data.message || this.translations.http_400, res.data, this.getValidationErrors(res.data));
96
96
  break;
97
97
  case 404:
98
- if(res.data.message) {
99
- this.dispatchError(res.data.message, res.data);
100
- } else {
101
- this.dispatchError(this.translations.http_404, res.data);
102
- }
98
+ this.dispatchError(res.data.message || this.translations.http_404, res.data);
103
99
  break;
104
100
  case 401:
105
- this.dispatchError(this.translations.http_401, res.data);
101
+ this.dispatchError(res.data.message || this.translations.http_401, res.data);
106
102
  break;
107
103
  case 403:
108
- this.dispatchError(this.translations.http_403, res.data);
104
+ this.dispatchError(res.data.message || this.translations.http_403, res.data);
109
105
  break;
110
106
  case 405:
111
- this.dispatchError(this.translations.http_405, res.data);
107
+ this.dispatchError(res.data.message || this.translations.http_405, res.data);
112
108
  break;
113
109
  case 413:
114
- this.dispatchError(this.translations.http_413, res.data);
110
+ this.dispatchError(res.data.message || this.translations.http_413, res.data);
115
111
  break;
116
112
  case 419:
117
- this.dispatchError(this.translations.http_419, res.data);
113
+ this.dispatchError(res.data.message || this.translations.http_419, res.data);
118
114
  break;
119
115
  case 502:
120
- this.dispatchError(this.translations.http_502, res.data);
116
+ this.dispatchError(res.data.message || this.translations.http_502, res.data);
121
117
  break;
122
118
  case 504:
123
- this.dispatchError(this.translations.http_504, res.data);
119
+ this.dispatchError(res.data.message || this.translations.http_504, res.data);
124
120
  break;
125
121
  default:
126
- this.dispatchError(this.translations.http_other_error, res.data);
122
+ this.dispatchError(res.data.message || this.translations.http_other_error, res.data);
127
123
  }
128
124
  } else {
129
125
  this.dispatchError(this.translations.http_no_response, {});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dile/crud",
3
- "version": "1.5.2",
3
+ "version": "1.5.3",
4
4
  "description": "Components to create a generic crud system based on Web Components and Lit",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -31,5 +31,5 @@
31
31
  "publishConfig": {
32
32
  "access": "public"
33
33
  },
34
- "gitHead": "cb5c0c969e983dce3a5b6a864bed1eaf0795e97c"
34
+ "gitHead": "0d71120f99b23375930d042130aecbf95ffe8602"
35
35
  }