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

Better handling of timing out when calling endpoints #4

Open
whitfin opened this issue Oct 4, 2017 · 1 comment
Open

Better handling of timing out when calling endpoints #4

whitfin opened this issue Oct 4, 2017 · 1 comment

Comments

@whitfin
Copy link
Contributor

whitfin commented Oct 4, 2017

I'm getting errors when calling any endpoints:

com.fasterxml.jackson.core.JsonParseException: Unexpected character ('<' (code 60)): expected a valid value (number, String, array, object, 'true', 'false' or 'null')
 at [Source: [B@40def23; line: 1, column: 2]

	at com.fasterxml.jackson.core.JsonParser._constructError(JsonParser.java:1702)
	at com.fasterxml.jackson.core.base.ParserMinimalBase._reportError(ParserMinimalBase.java:558)
	at com.fasterxml.jackson.core.base.ParserMinimalBase._reportUnexpectedChar(ParserMinimalBase.java:456)
	at com.fasterxml.jackson.core.json.UTF8StreamJsonParser._handleUnexpectedValue(UTF8StreamJsonParser.java:2689)
	at com.fasterxml.jackson.core.json.UTF8StreamJsonParser._nextTokenNotInObject(UTF8StreamJsonParser.java:878)
	at com.fasterxml.jackson.core.json.UTF8StreamJsonParser.nextToken(UTF8StreamJsonParser.java:772)
	at com.fasterxml.jackson.databind.ObjectMapper._initForReading(ObjectMapper.java:3850)
	at com.fasterxml.jackson.databind.ObjectMapper._readMapAndClose(ObjectMapper.java:3799)
	at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:2945)
	at com.github.lake54.groupsio.api.resource.BaseResource.mapToError(BaseResource.java:145)
	at com.github.lake54.groupsio.api.resource.BaseResource.callApi(BaseResource.java:120)
	at com.github.lake54.groupsio.api.resource.BaseResource.callApi(BaseResource.java:90)
	at com.github.lake54.groupsio.api.resource.GroupResource.getSubgroups(GroupResource.java:97)

It might be nice to catch timeouts in advance rather than having Jackson be the thing to crash.

@nightowlengineer
Copy link
Owner

I'll have a look into this tomorrow. To clarify - this was a timeout from the remote end being fed back to the client? Or the client itself was timing out?

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

No branches or pull requests

2 participants