Skip to content

Backend error when the pattern matches an empty substring #18

@zhenyavinogradov

Description

@zhenyavinogradov

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions