-
Notifications
You must be signed in to change notification settings - Fork 31
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
HTTP::Error Unknown MIME type: text/html #18
Comments
correct, but sometimes if anything wrong in client access token like adding spaces etc this issue is reproduced we can resolve by making it correct |
I just started getting this error from dialogflow, quite concerning as this is breaking our chatbot and all conversations |
Just got this error as well. |
Same here, we keep getting this error every once in a while. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When API.ai does not respond with json calling
#parse
on a HTTP response raises an exception as no other Mime Type handler is registered yet. (HTTP implements json handler as default: https://github.com/httprb/http/blob/master/lib/http/mime_type/json.rb)This problem mostly occurrs when API.ai is down (so should not be a big deal as I hope it is not that often down :D), but still it would be helpful to have a more intuitive exception raised.
Further down in apiai-ruby-cllient the problem is that
fail_or_return_response_body(response.code, response_body)
already takes the parsed response as argument.apiai-ruby-client should probably only call
#parse
if it knows it's a json response.Is this anything we should improve? If yes I will try to create a pr for it.
The text was updated successfully, but these errors were encountered: