Skip to content

Commit

Permalink
Hotfix change error management from portal-backend
Browse files Browse the repository at this point in the history
  • Loading branch information
M4n0x committed Dec 22, 2021
1 parent dc8b250 commit 579fd5f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
11 changes: 6 additions & 5 deletions src/components/API/Experiment.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -200,11 +200,12 @@ class Experiment extends Container<State> {
...experiment,
status: 'error',
result: [
{
type: MIME_TYPES.ERROR,
data: 'An unknown error occured. Please retry in a moment'
},
...(experiment?.result || [])
...(experiment?.result ?? [
{
type: MIME_TYPES.ERROR,
data: 'An unknown error occured. Please retry in a moment'
}
])
]
};
}
Expand Down
4 changes: 3 additions & 1 deletion src/components/API/Mining.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,9 @@ class Mining extends Container<MiningState> {
return this.setState({
histograms: {
data: undefined,
error: response.data.message,
error:
response.data.message ??
(mining.result ? mining.result[0].data : 'unknown error occured'),
loading: false
}
});
Expand Down

0 comments on commit 579fd5f

Please sign in to comment.