Skip to content

Commit

Permalink
catch errors in Connector form
Browse files Browse the repository at this point in the history
  • Loading branch information
gmmorris committed Nov 20, 2020
1 parent 17f67f9 commit 1653add
Showing 1 changed file with 23 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import {
EuiLoadingSpinner,
EuiFlexGroup,
EuiFlexItem,
EuiErrorBoundary,
EuiTitle,
} from '@elastic/eui';
import { i18n } from '@kbn/i18n';
Expand Down Expand Up @@ -179,26 +180,28 @@ export const ActionConnectorForm = ({
</h4>
</EuiTitle>
<EuiSpacer size="s" />
<Suspense
fallback={
<EuiFlexGroup justifyContent="center">
<EuiFlexItem grow={false}>
<EuiLoadingSpinner size="m" />
</EuiFlexItem>
</EuiFlexGroup>
}
>
<FieldsComponent
action={connector}
errors={errors}
readOnly={!canSave}
editActionConfig={setActionConfigProperty}
editActionSecrets={setActionSecretsProperty}
http={http}
docLinks={docLinks}
consumer={consumer}
/>
</Suspense>
<EuiErrorBoundary>
<Suspense
fallback={
<EuiFlexGroup justifyContent="center">
<EuiFlexItem grow={false}>
<EuiLoadingSpinner size="m" />
</EuiFlexItem>
</EuiFlexGroup>
}
>
<FieldsComponent
action={connector}
errors={errors}
readOnly={!canSave}
editActionConfig={setActionConfigProperty}
editActionSecrets={setActionSecretsProperty}
http={http}
docLinks={docLinks}
consumer={consumer}
/>
</Suspense>
</EuiErrorBoundary>
</>
) : null}
</EuiForm>
Expand Down

0 comments on commit 1653add

Please sign in to comment.