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

bug: unexpected handling of http 400 error #2828

Closed
talagluck opened this issue Mar 26, 2024 · 2 comments · Fixed by #2874
Closed

bug: unexpected handling of http 400 error #2828

talagluck opened this issue Mar 26, 2024 · 2 comments · Fixed by #2874
Assignees
Labels
bug Something isn't working

Comments

@talagluck
Copy link
Contributor

Description

I'm trying the following query:

select * From read_json('https://data.cityofnewyork.us/resource/2npr-yv2b.json?$limit=1000');

And I'm getting the following error:

ExecutionException: External error: Exec error: Remote session error: unable to dispatch table access: status: Unknown, message: "Missing session for id c3031c45-efcd-4491-b863-60f9570a88fe", details: [], metadata: MetadataMap { headers: {"content-type": "application/grpc", "content-length": "0", "date": "Tue, 26 Mar 2024 16:32:02 GMT"} }

When I go directly to the url, I can see the data.

And when I run this query, it works:

select * From read_json('https://opdb.org/api/search/typeahead?q=*');
@talagluck talagluck added the bug Something isn't working label Mar 26, 2024
@talagluck talagluck changed the title bug: issue with read_json over http bug: issue with read_json over https Mar 26, 2024
@talagluck talagluck changed the title bug: issue with read_json over https bug: issue with read_json Mar 26, 2024
@tychoish
Copy link
Contributor

Some debugging notes here:

  • the $ in the URL seems to be potentially an issue. or at least that's a thing that's different between the thing that works and the thing that doesn't (this is unlikely to be the thing)
  • the session error seems like a "running in cloud" problem, so I ran it locally in the CLI off of (approximately) main and got the following response
      > select * From read_json('https://data.cityofnewyork.us/resource/2npr-yv2b.json?$limit=1000');
      Error: External error: Unexpected status code '400 Bad Request' for url: 'https://data.cityofnewyork.us/resource/2npr-yv2b.json?$limit=1000'
    
    I don't think this is a cloud problem, or at least it's not a cloud problem worth looking at yet.
  • I did some poking at this more and curl gives me a 400 when I attempt to do a HEAD request, so that's probably worth looking into.
  • The error reporting from remote glaredb instances probably could be better.

We definitely should investigate more here if there's something easy to get these to work (like HEAD request avoidance) but some web servers/CDNs might not be compatible for a bit.

@talagluck
Copy link
Contributor Author

Totally fair - and to be clear, this isn't necessarily a "let's fix now" but an "I see something that doesn't work and it would be nice if it did."

@tychoish tychoish changed the title bug: issue with read_json bug: unexpected handling of http 400 error Mar 27, 2024
vrongmeal added a commit that referenced this issue Apr 10, 2024
The `HEAD` method might not be supported. Ignore client side errors and
assume we have `0` content length.

Fixes: #2828

Signed-off-by: Vaibhav <vrongmeal@gmail.com>
vrongmeal added a commit that referenced this issue Apr 11, 2024
The `HEAD` method might not be supported. Ignore client side errors and
assume we have `0` content length.

Fixes: #2828

Signed-off-by: Vaibhav <vrongmeal@gmail.com>
vrongmeal added a commit that referenced this issue Apr 12, 2024
)

The `HEAD` method might not be supported. Ignore client side errors and
assume we have `0` content length.

Fixes: #2828

---------

Signed-off-by: Vaibhav <vrongmeal@gmail.com>
Co-authored-by: Sam Kleinman <sam@glaredb.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants