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

fixed 'Maintype was not text, image, or querystring' error, when wrong type of response #303

Closed
wants to merge 2 commits into from

Conversation

ramusus
Copy link

@ramusus ramusus commented Jul 25, 2016

No description provided.

@martey
Copy link
Member

martey commented Jul 29, 2016

As I described in #281 (comment), the "Maintype was not text, image, or querystring" error message is a generic error.

It would help if you could describe the issue that this fixes (are you seeing API responses that are valid JSON but are being returned with a HTML content-type?) and provide code that triggers the error.

@martey
Copy link
Member

martey commented Aug 18, 2016

I am closing this pull request since there hasn't been a response in 3 weeks. I'll still receive any comments submitted here through email, though.

@martey martey closed this Aug 18, 2016
@matnel
Copy link

matnel commented Jan 3, 2017

It seems that if too much data is asked, Facebook returns text (i.e., no header information to say this is JSON):

{"error":{"code":1,"message":"Please reduce the amount of data you're asking for, then retry your request"}}

But I think the current PR tries to type all HTML content into JSON (which well... might fail badly).
Instead, there might be room for some try - catch kind of thing.

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.

3 participants