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

fix(insights): gracefully handle no manifests and missing symbols #6013

Merged
merged 1 commit into from
Mar 14, 2024

Conversation

intellix
Copy link
Contributor

@intellix intellix commented Mar 14, 2024

Overview

Closes #6012

When fetching insights, it throws a 500 error each time for my projects when there are no manifests

What is it?

  • Feature / enhancement
  • Bug
  • Docs / tests / types / typos

Description

. After pulling it locally and running it on a brand new app, I've noticed there were 2x errors:

  • Cannot use inArray without at least 1 item (so I've added a condition to not use it when it's empty)
  • Cannot read name of undefined:
[vite] Internal server error: Cannot read properties of undefined (reading 'name')
  File: /Projects/qwik/packages/insights/src/stats/edges.ts:211:4
  209|    clusters.forEach((cluster) => {
  210|      const symbols = cluster.map((id) => symbolVectors.symbols[id]);
  211|      const symbolNames = symbols.map((s) => s.name);

Use cases and why

    1. One use case
    1. Another use case

Checklist:

  • My code follows the developer guidelines of this project
  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation
  • Added new tests to cover the fix / functionality

Copy link

netlify bot commented Mar 14, 2024

👷 Deploy request for qwik-insights pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit ab7f37e

Copy link
Member

@wmertens wmertens left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@wmertens wmertens merged commit 7444776 into QwikDev:main Mar 14, 2024
26 checks passed
@intellix intellix deleted the insights-500-no-manifests branch March 14, 2024 19:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[🐞] Qwik Insights returns 500 error for fetching data/strategy
2 participants