Skip to content

DataError: invalid regular expression: parentheses () not balanced #2920

@sentry

Description

@sentry

Looks like we may need to sanitize input to avoid it being parsed as a regex.

Sentry Issue: STUDIO-E50

DataError: invalid regular expression: parentheses () not balanced

  File "django/db/backends/utils.py", line 64, in execute
    return self.cursor.execute(sql, params)
  File "newrelic/hooks/database_psycopg2.py", line 51, in execute
    **kwargs)
  File "newrelic/hooks/database_dbapi2.py", line 25, in execute
    *args, **kwargs)
  File "django_prometheus/db/common.py", line 68, in execute
    return super(CursorWrapper, self).execute(*args, **kwargs)

DataError: invalid regular expression: parentheses () not balanced

(23 additional frame(s) were not displayed)
...
  File "django/utils/six.py", line 685, in reraise
    raise value.with_traceback(tb)
  File "django/db/backends/utils.py", line 64, in execute
    return self.cursor.execute(sql, params)
  File "newrelic/hooks/database_psycopg2.py", line 51, in execute
    **kwargs)
  File "newrelic/hooks/database_dbapi2.py", line 25, in execute
    *args, **kwargs)
  File "django_prometheus/db/common.py", line 68, in execute
    return super(CursorWrapper, self).execute(*args, **kwargs)

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions