Skip to content

Commit 1c15b91

Browse files
AdrinlolNikolayS
authored andcommitted
fix(ui): change error message from json format to string
1 parent 5b7eaa9 commit 1c15b91

File tree

2 files changed

+5
-3
lines changed
  • ui/packages/shared/pages

2 files changed

+5
-3
lines changed

‎ui/packages/shared/pages/CreateClone/stores/Main.ts

+4-3
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ export class MainStore {
3535

3636
readonly snapshots: SnapshotsStore
3737

38-
3938
constructor(api: MainStoreApi) {
4039
makeAutoObservable(this)
4140

@@ -78,7 +77,8 @@ export class MainStore {
7877
})
7978
}
8079

81-
if (error) this.cloneError = await getTextFromUnknownApiError(error)
80+
if (error)
81+
this.cloneError = await error.json().then((err) => err?.message || err)
8282

8383
return Boolean(response)
8484
}
@@ -101,6 +101,7 @@ export class MainStore {
101101
)
102102
}
103103

104-
if (error) this.cloneError = await getTextFromUnknownApiError(error)
104+
if (error)
105+
this.cloneError = await error.json().then((err) => err?.message || err)
105106
}
106107
}

‎ui/packages/shared/pages/Instance/SnapshotsModal/index.tsx

+1
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ const useStyles = makeStyles(
3636
root: {
3737
fontSize: '14px',
3838
marginTop: 0,
39+
display: 'block',
3940
},
4041
container: {
4142
maxHeight: '400px',

0 commit comments

Comments
 (0)