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

Provide meaningful error messages if some API limits are reached #123

Closed
shuron opened this issue Jul 27, 2016 · 2 comments
Closed

Provide meaningful error messages if some API limits are reached #123

shuron opened this issue Jul 27, 2016 · 2 comments
Labels
type: bug bug in the library

Comments

@shuron
Copy link

shuron commented Jul 27, 2016

Issue Summary

This is the stacktrace of the exception i get when i trying to send message with subject longer than 87 chars...

org.apache.http.client.HttpResponseException: Unsupported Media Type
    at org.apache.http.impl.client.AbstractResponseHandler.handleResponse(AbstractResponseHandler.java:69) ~[httpclient-4.5.2.jar:4.5.2]
    at org.apache.http.impl.client.BasicResponseHandler.handleResponse(BasicResponseHandler.java:65) ~[httpclient-4.5.2.jar:4.5.2]
    at org.apache.http.impl.client.BasicResponseHandler.handleResponse(BasicResponseHandler.java:51) ~[httpclient-4.5.2.jar:4.5.2]
    at com.sendgrid.Client.getResponse(Client.java:138) ~[java-http-client-2.3.2.jar:na]
    at com.sendgrid.Client.post(Client.java:217) ~[java-http-client-2.3.2.jar:na]
    at com.sendgrid.Client.api(Client.java:369) ~[java-http-client-2.3.2.jar:na]
    at com.sendgrid.SendGrid.makeCall(SendGrid.java:92) ~[sendgrid-java-3.0.6.jar:na]
    at com.sendgrid.SendGrid.api(SendGrid.java:111) ~[sendgrid-java-3.0.6.jar:na]

Technical details:

  • sendgrid-java Version: release 3.0.6
  • Java Version: 8
@shuron
Copy link
Author

shuron commented Jul 27, 2016

I just figured out that this is even more stranger
i cannot send message with subject:

"ффффффффффззззззззззннннннннннффффффффффззззззззззннннннннннффффффффффззззззззззщщщщщххasssss ssssssss dhdhdhdhdhd hdhd dh h ddh "

or

"ффффффффффззззззззззннннннннннффффффффффззззззззззннннннннннффффффффффззззззззззщщщщщххasssss ssssssss dhdhdhdhdhd hdhd dh h ddh."

or

"ффффффффффззззззззззннннннннннффффффффффззззззззззннннннннннффффффффффззззззззззщщщщщххasssss ssssssss dhdhdhdhdhd hdhd dh h ddh!"

but succesfully send:

"ффффффффффззззззззззннннннннннффффффффффззззззззззннннннннннффффффффффззззззззззщщщщщххasssss ssssssss dhdhdhdhdhd hdhd dh h ddh"

without trailing space or dot or exclamation mark

@shuron shuron changed the title meaningful error messages if some API limits are reached (eg. max subject length 87 chars) Provide meaningful error messages if some API limits are reached (eg. max subject length 87 chars) Jul 27, 2016
@shuron shuron changed the title Provide meaningful error messages if some API limits are reached (eg. max subject length 87 chars) Provide meaningful error messages if some API limits are reached Jul 27, 2016
@thinkingserious thinkingserious added the type: bug bug in the library label Jul 28, 2016
@thinkingserious
Copy link
Contributor

Hi @shuron!

Thanks for the feedback!

Regarding the error messages, we are tracking that one here: sendgrid/java-http-client#10. I'll add your vote to get that moved up our internal queue.

I believe you are being bitten by this bug: sendgrid/sendgrid-csharp#262

The fix should be deploying any day now.

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

No branches or pull requests

2 participants