Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SR] Error handling not working as expected for fetching repositories #56442

Closed
alisonelizabeth opened this issue Jan 30, 2020 · 2 comments
Closed
Labels
bug Fixes for quality problems that affect the customer experience Feature:Snapshot and Restore Elasticsearch snapshots and repositories UI Team:Kibana Management Dev Tools, Index Management, Upgrade Assistant, ILM, Ingest Node Pipelines, and more

Comments

@alisonelizabeth
Copy link
Contributor

alisonelizabeth commented Jan 30, 2020

There are two bugs here:

  1. The destructing on #L49 breaks when there is an error, since data is null.
  2. Once that is resolved, you'll also see it looks like there was code added for (possibly) testing purposes in the Snapshot + Restore policy form that results in the error description to always equal "test". See: #L202.
error={{ data: { error: 'test' } } || errorLoadingRepositories}

Complete component code:

        <SectionError
          title={
            <FormattedMessage
              id="xpack.snapshotRestore.policyForm.loadingRepositoriesErrorMessage"
              defaultMessage="Error loading repositories"
            />
          }
          error={{ data: { error: 'test' } } || errorLoadingRepositories}
          actions={
            <EuiButton
              onClick={() => reloadRepositories()}
              color="danger"
              iconType="refresh"
              data-test-subj="reloadRepositoriesButton"
            >
              <FormattedMessage
                id="xpack.snapshotRestore.policyForm.reloadRepositoriesButtonLabel"
                defaultMessage="Reload repositories"
              />
            </EuiButton>
          }
        />``

@alisonelizabeth alisonelizabeth added bug Fixes for quality problems that affect the customer experience Team:Kibana Management Dev Tools, Index Management, Upgrade Assistant, ILM, Ingest Node Pipelines, and more Feature:Snapshot and Restore Elasticsearch snapshots and repositories UI labels Jan 30, 2020
@elasticmachine
Copy link
Contributor

Pinging @elastic/es-ui (Team:Elasticsearch UI)

@alisonelizabeth
Copy link
Contributor Author

I believe this was addressed as part of the NP migration (#59109). Repository errors appear to render correctly now.

Screen Shot 2021-04-19 at 11 43 29 AM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fixes for quality problems that affect the customer experience Feature:Snapshot and Restore Elasticsearch snapshots and repositories UI Team:Kibana Management Dev Tools, Index Management, Upgrade Assistant, ILM, Ingest Node Pipelines, and more
Projects
None yet
Development

No branches or pull requests

2 participants