-
Notifications
You must be signed in to change notification settings - Fork 34
Open
Description
In com.sparkpost.resources.ResourceSuppressionList the insertOrUpdate methods do this:
SupressionListResponse suppressionListResponse = (SupressionListResponse) SupressionListResponse.decode(response, SupressionListResponse.class);
return suppressionListResponse;
but the api returns this:
{
"results": {
"message": "Suppression list successfully updated"
}
}
so gson shits the bed
com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: Expected BEGIN_ARRAY but was BEGIN_OBJECT at line 1 column 13 path $.results
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:226)
at com.google.gson.Gson.fromJson(Gson.java:932)
at com.google.gson.Gson.fromJson(Gson.java:897)
at com.google.gson.Gson.fromJson(Gson.java:846)
at com.sparkpost.model.responses.Response.decode(Response.java:47)
at com.sparkpost.resources.ResourceSuppressionList.insertOrUpdate(ResourceSuppressionList.java:32)
Metadata
Metadata
Assignees
Labels
No labels