We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fcdbe34 commit d97d141Copy full SHA for d97d141
src/design/lib/stores/toast/index.ts
@@ -50,7 +50,12 @@ const useToastStore = (): ToastStore => {
50
try {
51
title = error.response.status.toString()
52
const errorMessage = await error.response.text()
53
- description = errorMessage.split('\n')[0].split(': ')[1]
+ description = errorMessage.split('\n')[0]
54
+ if (description.includes('Error: ')) {
55
+ const splits = description.split(': ')
56
+ splits.shift()
57
+ description = splits.join()
58
+ }
59
} catch (error) {}
60
}
61
0 commit comments