@peng_kai/kit 0.0.13 → 0.0.14

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@peng_kai/kit",
3
- "version": "0.0.13",
3
+ "version": "0.0.14",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -27,7 +27,7 @@ export function popupMessage(popup: (type: 'error' | 'success', message: string)
27
27
  const errorMessageConfig = error?.config?.errorMessage
28
28
 
29
29
  if (errorMessageConfig === false)
30
- return error
30
+ throw error
31
31
 
32
32
  let errorMsg: boolean | string = errorMessageConfig
33
33
 
@@ -45,7 +45,7 @@ export function popupMessage(popup: (type: 'error' | 'success', message: string)
45
45
  if (typeof errorMsg === 'string')
46
46
  popup('error', errorMsg)
47
47
 
48
- return error
48
+ throw error
49
49
  },
50
50
  ]
51
51
  }
@@ -15,9 +15,9 @@ export function unitizeAxiosError(): Parameters<AxiosInterceptorManager<any>['us
15
15
  throw new axios.AxiosError(`${error.message}[AppError01]`)
16
16
 
17
17
  if (typeof error === 'object')
18
- throw new axios.AxiosError(`${JSON.stringify(error)}[AppError01]`)
18
+ throw new axios.AxiosError(`${JSON.stringify(error)}[AppError02]`)
19
19
 
20
- throw new axios.AxiosError(`${String(error)}[AppError01]`)
20
+ throw new axios.AxiosError(`${String(error)}[AppError03]`)
21
21
  },
22
22
  ]
23
23
  }