feat(demodata): get error message from error for notification (#17983)

pull/18002/head
Deniz Kusefoglu 2020-05-06 17:26:49 -07:00 committed by GitHub
parent 37d44d882d
commit 33f77d7fea
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -34,6 +34,7 @@ import {
Dashboard,
} from 'src/types'
import {reportError} from 'src/shared/utils/errors'
import {getErrorMessage} from 'src/utils/api'
export type Actions =
| ReturnType<typeof setDemoDataStatus>
@ -124,7 +125,7 @@ export const getDemoDataBucketMembership = ({
dispatch(notify(demoDataSucceeded(bucketName, url)))
} catch (error) {
dispatch(notify(demoDataAddBucketFailed(error)))
dispatch(notify(demoDataAddBucketFailed(getErrorMessage(error))))
reportError(error, {
name: 'getDemoDataBucketMembership function',