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

Prevent terminating of tokens/contracts process #3375

Merged
merged 1 commit into from
Oct 21, 2020
Merged

Conversation

vbaranov
Copy link
Member

@vbaranov vbaranov commented Oct 20, 2020

Motivation

Prevent terminating of tokens/contracts process

Request: GET /token-autocomplete?q=https%3A%2F%2Fcircles.garden%2Fprofile0x4625d7b6ba483734f629d2f2d95d6b589dba4cd3
** (exit) an exception was raised:
    ** (Postgrex.Error) ERROR 42601 (syntax_error) syntax error in tsquery: "https://circles.garden/profile0x4625d7b6ba483734f629d2f2d95d6b589dba4cd3:*"
        (ecto_sql 3.3.4) lib/ecto/adapters/sql.ex:612: Ecto.Adapters.SQL.raise_sql_call_error/1
        (ecto_sql 3.3.4) lib/ecto/adapters/sql.ex:545: Ecto.Adapters.SQL.execute/5
        (ecto 3.3.4) lib/ecto/repo/queryable.ex:192: Ecto.Repo.Queryable.execute/4
        (ecto 3.3.4) lib/ecto/repo/queryable.ex:17: Ecto.Repo.Queryable.all/3
        (block_scout_web 0.0.1) lib/block_scout_web/controllers/chain_controller.ex:101: BlockScoutWeb.ChainController.token_autocomplete/2
        (block_scout_web 0.0.1) lib/block_scout_web/controllers/chain_controller.ex:1: BlockScoutWeb.ChainController.action/2
        (block_scout_web 0.0.1) lib/block_scout_web/controllers/chain_controller.ex:1: BlockScoutWeb.ChainController.phoenix_controller_pipeline/2
        (phoenix 1.5.4) lib/phoenix/router.ex:352: Phoenix.Router.__call__/2

Changelog

Remove special symbols from a searching pattern before making a full-text search query.

Checklist for your Pull Request (PR)

@coveralls
Copy link

coveralls commented Oct 20, 2020

Pull Request Test Coverage Report for Build 094d39375e22771b959892bf74b16d34d91bf243-PR-3375

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 6 unchanged lines in 3 files lost coverage.
  • Overall coverage increased (+2.9%) to 67.525%

Files with Coverage Reduction New Missed Lines %
lib/block_scout_web/channels/address_channel.ex 2 36.96%
lib/block_scout_web/controllers/chain/market_history_chart_controller.ex 2 71.43%
lib/block_scout_web/notifier.ex 2 82.95%
Totals Coverage Status
Change from base Build eb124072b7f9969cb5f7a0e8f488f66f88da609f: 2.9%
Covered Lines: 2046
Relevant Lines: 3030

💛 - Coveralls

@vbaranov vbaranov merged commit 51ed874 into master Oct 21, 2020
@vbaranov vbaranov deleted the vb-fix-token-search branch October 21, 2020 07:44
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