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(lxlweb): Continue showing error page for _invalid when not using Supersearch #1195

Merged
merged 2 commits into from
Dec 20, 2024

Conversation

jesperengstrom
Copy link
Contributor

Description

Solves

Frontend tests were failing because of API changes added in libris/librisxl#1541
Basically the lack of @id for an invalid property caused the 500 error page to show instead of expected 400.

However, when fixing this and using 'old search' the resulting page for an invalid query is now this:
Skärmavbild 2024-12-20 kl  10 08 56

We figured as long as supersearch is not fully implemented, users still want some kind of feedback when using invalid queries. Therefore manually (temporarily) showing the same error page as before. This also makes tests pass.

ping @olovy @kwahlin

Summary of changes

  • Add interface for InvalidProperty
  • Add @id check in search.ts
  • In search.ts, when encountering an _invalid property, show error page with same message as before.

@jesperengstrom jesperengstrom marked this pull request as ready for review December 20, 2024 10:47
Copy link
Contributor

@johanbissemattsson johanbissemattsson left a comment

Choose a reason for hiding this comment

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

LGTM! (see comment)

lxl-web/src/lib/utils/search.ts Outdated Show resolved Hide resolved
@jesperengstrom jesperengstrom merged commit 2cba5f4 into develop Dec 20, 2024
2 checks passed
@jesperengstrom jesperengstrom deleted the fix-lxlweb-return-error-on-_invalid branch December 20, 2024 11:46
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.

2 participants