Skip to content

Commit f97a09b

Browse files
author
Alejandro Fernández Gómez
committed
Add feedback for the error case
1 parent 657ebf8 commit f97a09b

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

x-pack/plugins/infra/public/hooks/use_trial_status.tsx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
*/
66

77
import { boolean } from 'io-ts';
8+
import { i18n } from '@kbn/i18n';
89

910
import { useState } from 'react';
1011
import { useKibana } from '../../../../../src/plugins/kibana_react/public';
@@ -31,6 +32,13 @@ export function useTrialStatus(): UseTrialStatusState {
3132
onResolve: (response) => {
3233
setIsTrialAvailable(response);
3334
},
35+
onReject: (error) => {
36+
services.notifications.toasts.addDanger(
37+
i18n.translate('xpack.infra.trialStatus.trialStatusNetworkErrorMessage', {
38+
defaultMessage: 'We could not determine if the trial license is available',
39+
})
40+
);
41+
},
3442
},
3543
[services]
3644
);

0 commit comments

Comments
 (0)