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

Backend error when the pattern matches an empty substring #18

Open
zhenyavinogradov opened this issue Feb 5, 2021 · 0 comments
Open

Comments

@zhenyavinogradov
Copy link
Contributor

When you try to use a pattern which can match an empty substring, backend fails without responding to the query. E.g. searching for x?: https://hackage-search.serokell.io/?q=x%3F

In the logs there is this error: Cannot decode byte '\xc2': Data.Text.Internal.Encoding.decodeUtf8: Invalid UTF-8 stream. Maybe it's because decodeUtf8 is applied to a sliced bytestring, and the slice can happen in the middle of a UTF-8 sequence.

slice n m = Text.decodeUtf8 (sliceByteString n m raw_str)

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

No branches or pull requests

1 participant