We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e5a7c96 commit c890aa7Copy full SHA for c890aa7
lib/meilisearch/error.rb
@@ -33,6 +33,11 @@ def get_meilisearch_error_info(http_body)
33
@ms_message = @http_body['message']
34
@ms_type = @http_body['errorType']
35
@ms_link = @http_body['errorLink']
36
+ rescue JSON::ParserError
37
+ # We might receive a JSON::ParserError when, for example, MeiliSearch is running behind
38
+ # some proxy (ELB or Nginx, for example), and the request timeouts, returning us
39
+ # a raw HTML body instead of a JSON as we were expecting
40
+ @ms_message = "MeiliSearch API has not returned a valid JSON HTTP body: #{http_body}"
41
end
42
43
def details
0 commit comments