typesense / typesense-js

JavaScript / TypeScript client for Typesense
https://typesense.org/docs/api
Apache License 2.0
414 stars 75 forks source link

Regex syntax error? #133

Closed nandorojo closed 2 years ago

nandorojo commented 2 years ago

Description

Hey, so I'm not 100% sure if this issue is caused by Typesense yet, but since I added a Typesense facet_query search to a screen, I started getting it on Sentry. Does something like this look familiar?

SyntaxError: Invalid regular expression: missing )

Sorry this issue is half-baked, I'm trying to get to the bottom of this and wanted to see if it looked like something that could be related to Typesense. I'm grasping at straws here, but could it be this line?

Steps to reproduce

TBD, trying to reproduce still. It's inconsistent, but judging from user sessions it happens when people are typing in an input for a facet search.

Expected Behavior

N/A

Actual Behavior

SyntaxError: Invalid regular expression: missing )

Metadata

Typsense Version: 1.4.0

OS:

MacOS

jasonbosco commented 2 years ago

@nandorojo The line you linked to isn't actually part of the Typesense source code - it's coming from a dependency.

typesense-js itself doesn't use any RegEx.

nandorojo commented 2 years ago

Got it, must not be related then. Thanks for letting me know.

nandorojo commented 2 years ago

Do you by chance know what that dependency is doing in that line?

Is it possible that dependency is getting used to construct URLs or something?

It feels unlikely that it's related, but I also don't use any RegExp in my app, so I am trying to find the issue anywhere I can...

Appreciate your time here.

nandorojo commented 2 years ago

Ah, sorry, disregard this. I think it's related to a dependency I have which I just found and removed. Thanks again.