Skip to content

Fix stray double quote in SearchFailedError message#1262

Open
jwils wants to merge 1 commit into
mainfrom
joshuaw/fix-search-failure-error-stray-quote
Open

Fix stray double quote in SearchFailedError message#1262
jwils wants to merge 1 commit into
mainfrom
joshuaw/fix-search-failure-error-stray-quote

Conversation

@jwils

@jwils jwils commented Jun 17, 2026

Copy link
Copy Markdown
Collaborator

What

The heredoc that formats datastore search failures in DatastoreSearchRouter#raise_search_failed_if_any_failures had a dangling " immediately after the inspected error hash:

#{response.fetch("error").inspect}"

This leaked a literal double quote into the operator-facing Errors::SearchFailedError message (e.g. {"bad stuff" => "happened"}").

Changes

  • Removed the stray " from the heredoc in elasticgraph-graphql/lib/elastic_graph/graphql/datastore_search_router.rb.
  • Extended the existing "raises Errors::SearchFailedError" spec to assert the message does not contain the dangling quote, guarding against regression.

Testing

bundle exec rspec elasticgraph-graphql/spec/unit/elastic_graph/graphql/datastore_search_router_spec.rb
# 22 examples, 0 failures

The heredoc that formats datastore search failures had a dangling "
after the inspected error hash, which leaked a literal double quote into
the operator-facing `Errors::SearchFailedError` message. Removed it and
extended the existing spec to guard against the regression.
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.

1 participant