Skip to content

Error handling improvements#154

Open
techgique wants to merge 3 commits into
devfrom
error-handling
Open

Error handling improvements#154
techgique wants to merge 3 commits into
devfrom
error-handling

Conversation

@techgique

Copy link
Copy Markdown
Member

No description provided.

techgique added 3 commits July 2, 2026 15:54
- Return raw `res` from `post` method so we can interact with it
  appropriately depending on the response from the search service
- DRY up code in different search methods
- Make default friendly error message less generic, indicating the
  search service encountered an error
- Handle different errors returned from search service
  - RuntimeError - Failed to communicate with search service
  - Forbidden - 40x response indicating access denied, indicating IP or
    user/pass auth configuration requires attention
  - BadRequest - Malformed request or search service syntax error,
    including if the query includes a mix of smart and regular quotes
  - ExceptionWithResponse - Catch all for all other errors
- Move post to protected methods
- Alphabetize protected methods
@techgique

Copy link
Copy Markdown
Member Author

Query string that will cause Elasticsearch to choke on a syntax error:
“I have studied many philosophers and many cats. The wisdom of cats is infinitely superior.”"

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