Skip to content
This repository has been archived by the owner on Jan 3, 2023. It is now read-only.

RuntimeException while parsing the NotifyResult #21

Open
njyeti opened this issue Jun 24, 2016 · 0 comments
Open

RuntimeException while parsing the NotifyResult #21

njyeti opened this issue Jun 24, 2016 · 0 comments

Comments

@njyeti
Copy link

njyeti commented Jun 24, 2016

pagerduty-incidents: v2.0.0

Call goes thru successfully however we're encountering the below exception once we get the response back.

java.lang.RuntimeException: Unable to invoke no-args constructor for class com.squareup.pagerduty.incidents.NotifyResult. Register an InstanceCreator with Gson for this type may fix this problem. at com.google.gson.internal.ConstructorConstructor$14.construct(ConstructorConstructor.java:226) at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:206) at retrofit2.converter.gson.GsonResponseBodyConverter.convert(GsonResponseBodyConverter.java:37) at retrofit2.converter.gson.GsonResponseBodyConverter.convert(GsonResponseBodyConverter.java:25) at retrofit2.ServiceMethod.toResponse(ServiceMethod.java:116) at retrofit2.OkHttpCall.parseResponse(OkHttpCall.java:211) at retrofit2.OkHttpCall.execute(OkHttpCall.java:174) at com.squareup.pagerduty.incidents.PagerDuty$1.notify(PagerDuty.java:49) at

Locally, I tried adding the default constructor on that class and seems to resolve the issue :)

NotifyResult() { this.status = null; this.message = null; this.incident_key = null; }

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant