Skip to content

Improve handling of non-JSON responses #139

Description

@bhornseth

Occassionally, the API (or more likely: the load balancer) will return anon-JSON response and we're handling that poorly:

MultiJson::ParseError lexical error: invalid char in json text.
                                       <h1>This website is under heavy
                     (right here) ------^
  
  /home/httpd/mls_search/prod/shared/bundle/ruby/2.3.0/gems/multi_json-1.12.1/lib/multi_json/adapters/yajl.rb:11:in `parse'
  /home/httpd/mls_search/prod/shared/bundle/ruby/2.3.0/gems/multi_json-1.12.1/lib/multi_json/adapters/yajl.rb:11:in `load'
  /home/httpd/mls_search/prod/shared/bundle/ruby/2.3.0/gems/multi_json-1.12.1/lib/multi_json/adapter.rb:21:in `load'
  /home/httpd/mls_search/prod/shared/bundle/ruby/2.3.0/gems/multi_json-1.12.1/lib/multi_json.rb:122:in `load'
  /home/httpd/mls_search/prod/shared/bundle/ruby/2.3.0/gems/spark_api-1.4.13/lib/spark_api/faraday_middleware.rb:20:in `on_complete'

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions