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

🐛 gracefully handle errors when items missing in underlying metadata store #276

Closed
tom-webber opened this issue Apr 23, 2024 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@tom-webber
Copy link
Contributor

Describe the bug.

It's possible to query for objects that don't exist on the DataHub instance (due to differences between environments), which currently returns an error. This should be handled rather than returning an error as it causes confusion during development. It's unlikely that such searches would be possible to encounter in the production environment.

To Reproduce

KeyError for properties["name"] when filtering for Databases (containers) on the dev DataHub instance (prior to databases being added / implemented).

Expected Behaviour

A search with 0 entries because none are present on the instance should return 0 results, rather than a key error.

Additional context

No response

@tom-webber tom-webber added the bug Something isn't working label Apr 23, 2024
@tom-webber tom-webber moved this to Todo in Data Catalogue Apr 23, 2024
@murdo-moj murdo-moj self-assigned this May 2, 2024
@murdo-moj murdo-moj moved this from Todo to In Progress in Data Catalogue May 2, 2024
@murdo-moj
Copy link
Contributor

There's now a switch in the search method of the datahub client to return an empty SearchResponse when the total results returned from DataHub is 0

@murdo-moj
Copy link
Contributor

murdo-moj commented May 3, 2024

As part of the refactor we added 404 responses when a table/database/chart urn isn't found #265

@murdo-moj murdo-moj moved this from In Progress to Review in Data Catalogue May 3, 2024
@MatMoore
Copy link
Contributor

MatMoore commented May 8, 2024

  • The 404 response is working as expected on the details page
  • I've added a partial to render a (hopefully) helpful message in the event that search returns no results Tidy empty search results page #320

The copy may need to be improved later, but this allows us to handle this case without blowing up and without rendering unnecessary parts of the page like pagination

@MatMoore MatMoore moved this from Review to Done in Data Catalogue May 8, 2024
@MatMoore MatMoore closed this as completed by moving to Done in Data Catalogue May 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Done ✅
Development

No branches or pull requests

3 participants