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

Version 0.0.5 produces cloudfront error in ContractResearchMap #2

Open
harrisonokins opened this issue Aug 11, 2020 · 0 comments
Open
Assignees
Labels

Comments

@harrisonokins
Copy link
Member

As part of the fix for https://github.com/assaydepot/contractresearchmap/pull/9, I attempted to upgrade the assaydepot gem from 0.0.2 to 0.0.5. The configuration block was un-changed:

AssayDepot.configure do |config|
    config.access_token = ENV["ASSAYDEPOT_TOKEN"]
    config.url = "https://app.scientist.com/api/v1"
end

I then ran:

AssayDepot::Client.new(:search_type => "providers").search(nil, {starts_with: "a"}, {})

which returned the following error:

JSON::ParserError: 784: unexpected token at '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<HTML><HEAD><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<TITLE>ERROR: The request could not be satisfied</TITLE>
</HEAD><BODY>
<H1>400 ERROR</H1>
<H2>The request could not be satisfied.</H2>
<HR noshade size="1px">
Bad request.
We can't connect to the server for this app or website at this time. There might be too much traffic or a configuration error. Try again later, or contact the app or website owner.
<BR clear="all">
If you provide content to customers through CloudFront, you can find steps to troubleshoot and help prevent this error by reviewing the CloudFront documentation.
<BR clear="all">
<HR noshade size="1px">
<PRE>
Generated by cloudfront (CloudFront)
Request ID: QjgH7_aq5seKt_LK-APSTS4kFKsyDpOf6oH36NMbA0sWuu7sKn53Iw==
</PRE>
<ADDRESS>
</ADDRESS>
</BODY></HTML>'
	from /Users/harrisonokins/.rbenv/versions/2.3.4/lib/ruby/gems/2.3.0/gems/json-1.8.6/lib/json/common.rb:155:in `parse'
	from /Users/harrisonokins/.rbenv/versions/2.3.4/lib/ruby/gems/2.3.0/gems/json-1.8.6/lib/json/common.rb:155:in `parse'
	from /Users/harrisonokins/.rbenv/versions/2.3.4/lib/ruby/gems/2.3.0/gems/assaydepot-0.0.5/lib/assaydepot/client.rb:29:in `get'
	from /Users/harrisonokins/.rbenv/versions/2.3.4/lib/ruby/gems/2.3.0/gems/assaydepot-0.0.5/lib/assaydepot/client.rb:73:in `search'
	from (irb):9
	from /Users/harrisonokins/.rbenv/versions/2.3.4/lib/ruby/gems/2.3.0/gems/railties-4.0.13/lib/rails/commands/console.rb:90:in `start'
	from /Users/harrisonokins/.rbenv/versions/2.3.4/lib/ruby/gems/2.3.0/gems/railties-4.0.13/lib/rails/commands/console.rb:9:in `start'
	from /Users/harrisonokins/.rbenv/versions/2.3.4/lib/ruby/gems/2.3.0/gems/railties-4.0.13/lib/rails/commands.rb:62:in `<top (required)>'
	from bin/rails:4:in `require'
	from bin/rails:4:in `<main>'

Reverting the gem back to 0.0.2 allowed me to continue accessing api/v1 normally, with no errors.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants