express-sweet-generator 2.0.5 → 2.0.7

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.
@@ -124,13 +124,13 @@ var build = __webpack_require__(236);
124
124
  /**
125
125
  * Handles API errors.
126
126
  * @param {number} code The HTTP status code.
127
- * @param {Error} err The error object.
127
+ * @param {Error} error The error object.
128
128
  * @return {void}
129
129
  */
130
- errorHook(code, err) {
130
+ errorHook(code, error) {
131
131
  // Check if the error object and request properties exist to avoid runtime errors
132
- if (err && err.request && err.request.responseURL) {
133
- const {pathname} = new URL(err.request.responseURL);
132
+ if (error && error.request && error.request.responseURL) {
133
+ const {pathname} = new URL(error.request.responseURL);
134
134
  if (pathname !== '/api/users/login' && code === 401) {
135
135
  // Redirect to the login page if an authentication error occurs on a non-login request.
136
136
  location.replace('/');
@@ -141,7 +141,7 @@ var build = __webpack_require__(236);
141
141
  ;// CONCATENATED MODULE: ./src/api/UserApi.js
142
142
 
143
143
 
144
- /* harmony default export */ const UserApi = (class extends components.Api {
144
+ /* harmony default export */ const UserApi = (class extends Api {
145
145
  constructor() {
146
146
  super('/api/users');
147
147
  }
@@ -205,10 +205,10 @@ function initForm() {
205
205
  if (!data)
206
206
  return void validation.setError('email', 'userNotFound');
207
207
  location.href = '/';
208
- } catch (err) {
208
+ } catch (error) {
209
209
  validation.offIndicator();
210
210
  build.components.Dialog.unknownError();
211
- throw err;
211
+ throw error;
212
212
  }
213
213
  });
214
214
  }