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

query[queryDataKey].split is not a function in search query transform #453

Closed
AetherUnbound opened this issue Feb 9, 2023 · 0 comments · Fixed by #1889
Closed

query[queryDataKey].split is not a function in search query transform #453

AetherUnbound opened this issue Feb 9, 2023 · 0 comments · Fixed by #1889
Labels
💻 aspect: code Concerns the software code in the repository 🛠 goal: fix Bug fix 🟩 priority: low Low priority and doesn't need to be rushed 🧱 stack: frontend Related to the Nuxt frontend 🐛 tooling: sentry Sentry issue

Comments

@AetherUnbound
Copy link
Contributor

Sentry link

https://openverse.sentry.io/share/issue/f7bcd3d050574f78b23936e923453e7c/

Description

TypeError: query[queryDataKey].split is not a function
  File "server.js", line 12723, col 52, in <anonymous>
  File "server.js", in Array.forEach
  File "server.js", line 12709, col 15, in queryToFilterData
  File "server.js", line 4073, col 124, in Object.setSearchStateFromUrl
  File "app:///pinia.prod.cjs", line 341, col 30, in Object.<anonymous>
    ret = action.apply(this && this.$id === $id ? this : store, args);
  File "pages/search.js", line 1948, col 17, in asyncData
  File "server.js", in runMicrotasks
  File "node:internal/process/task_queues", line 96, col 5, in processTicksAndRejections

This stacktrace was a bit difficult to decode, but I was able to pin it down to this line:

https://github.com/WordPress/openverse-frontend/blob/94fb35469ad28cc3cfd3d1b9ef877b695925a736/src/utils/search-query-transform.ts#L202

It appears that, while qquery[queryDataKey] may not be falsy from the check above, it might not be the correct type which is expected of an object that has the .split function available.

Reproduction

I was unable to reproduce this myself.

@AetherUnbound AetherUnbound added 🐛 tooling: sentry Sentry issue 💻 aspect: code Concerns the software code in the repository 🛠 goal: fix Bug fix 🟩 priority: low Low priority and doesn't need to be rushed labels Feb 9, 2023
@obulat obulat transferred this issue from WordPress/openverse-frontend Feb 22, 2023
@obulat obulat added the 🧱 stack: frontend Related to the Nuxt frontend label Feb 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
💻 aspect: code Concerns the software code in the repository 🛠 goal: fix Bug fix 🟩 priority: low Low priority and doesn't need to be rushed 🧱 stack: frontend Related to the Nuxt frontend 🐛 tooling: sentry Sentry issue
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants