@jetlinks-web/core 2.0.3 → 2.0.4

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.
Files changed (2) hide show
  1. package/package.json +4 -4
  2. package/src/axios.ts +1 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jetlinks-web/core",
3
- "version": "2.0.3",
3
+ "version": "2.0.4",
4
4
  "description": "",
5
5
  "main": "index.ts",
6
6
  "module": "index.ts",
@@ -16,9 +16,9 @@
16
16
  "license": "ISC",
17
17
  "dependencies": {
18
18
  "axios": "^1.7.4",
19
- "@jetlinks-web/types": "^1.0.2",
20
- "@jetlinks-web/utils": "^1.2.2",
21
- "@jetlinks-web/constants": "^1.0.5"
19
+ "@jetlinks-web/constants": "^1.0.7",
20
+ "@jetlinks-web/utils": "^1.2.5",
21
+ "@jetlinks-web/types": "^1.0.2"
22
22
  },
23
23
  "publishConfig": {
24
24
  "registry": "https://registry.npmjs.org/",
package/src/axios.ts CHANGED
@@ -100,7 +100,7 @@ const handleResponse = (response: AxiosResponse) => {
100
100
  }
101
101
 
102
102
  const errorHandler = (err: AxiosError<any>) => {
103
- let description = 'Error'
103
+ let description = err.response?.message || 'Error'
104
104
  let _status: string | number = 0
105
105
  if (err.response) {
106
106
  const {data, status} = err.response