-
Notifications
You must be signed in to change notification settings - Fork 12
Exception during deserialization of the "effectiveStartDate" property of the Subscription entity #30
Comments
In the official documentation of the Subscription resource in Microsoft CSP API, it's mentioned that |
I guess it is not issue for Partner Center Java SDK. It is seems relationed with some updates with Azure API end-point. You could submit this report into support of Microsoft. |
Hi @moghaddam, Can you try the operation again? I just suspended a subscription and captured the request using Fiddler. With my test all three dates were in the correct format
So, I am trying to pinpoint what might have caused this with your environment. |
I tried again just now, it's still the same.
|
@moghaddam Could you please say, these issues still present? |
yes, it's still present |
Hi @moghaddam, @msize, and @amazo197, I have modified the way the dates are deserialized with the subscription model. To address the issue I modified the data types from LocalDateTime to DateTime, which means those properties will be represented in UTC now and not the local time. This code has been committed, but we have not pushed out an update to Maven just yet. Our goal is to update the Maven package in the coming days. Once that has been done I will let each of you know. |
Hi @moghaddam, @msize, and @amazo197, Version 1.12.0 has just been released. This issue has been resolved with that release. I would like to encourage you to update and test. If you encounter any issue please let us know. |
Steps to reproduce
What steps can reproduce the defect?
We've not changed our code but since yesterday we get an exception when we try to suspend a subscription. Seems the value of the effectiveStartDate field in the response doesn't have the Zone while the API expect it to have.
Expected behavior
No exception.
Actual behavior
It throws an exception during the deserialization process in jackson.
Diagnostic logs
Caused by: PartnerApiParsingException: Response: {"id":"BB04FF1E-8ABA-4838-94DD-C40DAE59B9CE","offerId":"5C9FD4CC-EDCE-44A8-8E91-07DF09744609","entitlementId":"","offerName":"Office 365 Business","friendlyName":"One Com CSP Order","quantity":1,"unitType":"Licenses","hasPurchasableAddons":true,"creationDate":"2017-05-02T08:18:30.03Z","effectiveStartDate":"2017-05-02T00:00:00","commitmentEndDate":"2019-05-28T00:00:00","stat
us":"suspended","autoRenewEnabled":true,"isTrial":false,"billingType":"license","billingCycle":"unknown","actions":["Cancel","Edit"],"termDuration":"P1Y","isMicrosoftProduct":true,"suspensionReasons":["CustomerCancellation"],"attentionNeeded":false,"actionTaken":false,"contractType":"subscription","links":{"offer":{"uri":"/offers/5C9FD4CC-EDCE-44A8-8E91-07DF09744609?country=NO","method":"GET","headers":[]},"product":{"uri
":"/customers/{customer-guid}/products/CDD28E44-67E3-425E-BE4C-737FAB2899D3","method":"GET","headers":[]},"sku":{"uri":"/customers/{customer-guid}/products/CDD28E44-67E3-425E-BE4C-737FAB2899D3/skus/5C9FD4CC-EDCE-44A8-8E91-07DF09744609","method":"GET","headers":[]},"availability":{"uri":"/customers{customer-guid}/products/CDD28E44-67E3-425E-BE4C-737FAB2899D3/s
kus/5C9FD4CC-EDCE-44A8-8E91-07DF09744609/availabilities/5C9FD4CC-EDCE-44A8-8E91-07DF09744609","method":"GET","headers":[]},"self":{"uri":"/customers/{customer-guid}/subscriptions/BB04FF1E-8ABA-4838-94DD-C40DAE59B9CE","method":"GET","headers":[]}},"attributes":{"etag":"","objectType":"Subscription"}}
, Base Description: PartnerException: ErrorCategory: RESPONSE_PARSING, ServiceErrorPayload: null, Context: Request Id: 5534c996-1046-4180-b69a-d985ff51ae27, Correlation Id: en-US, Locale: {2}59b05d1b-ac4e-444d-911e-d93b03862b04, Base Description: com.microsoft.store.partnercenter.exception.PartnerResponseParseException: Could not deserialize response. Detailed message: Invalid format: "2017-05-02T00:00:00" is too short
at [Source: (String)"{"id":"BB04FF1E-8ABA-4838-94DD-C40DAE59B9CE","offerId":"5C9FD4CC-EDCE-44A8-8E91-07DF09744609","entitlementId":"","offerName":"Office 365 Business","friendlyName":"One Com CSP Order","quantity":1,"unitType":"Licenses","hasPurchasableAddons":true,"creationDate":"2017-05-02T08:18:30.03Z","effectiveStartDate":"2017-05-02T00:00:00","commitmentEndDate":"2019-05-28T00:00:00","status":"suspended","autoRenewE
nabled":true,"isTrial":false,"billingType":"license","billingCycle":"unknown","actions":["Cancel""[truncated 1048 chars]; line: 1, column: 308] (through reference chain: com.microsoft.store.partnercenter.models.subscriptions.Subscription["effectiveStartDate"])
at com.microsoft.store.partnercenter.network.PartnerServiceProxy.handleResponse(PartnerServiceProxy.java:692)
at com.microsoft.store.partnercenter.network.PartnerServiceProxy.send(PartnerServiceProxy.java:564)
at com.microsoft.store.partnercenter.network.PartnerServiceProxy.patch(PartnerServiceProxy.java:458)
at com.microsoft.store.partnercenter.subscriptions.SubscriptionOperations.patch(SubscriptionOperations.java:287)
at com.one.externalconnectors.csp.subscriptions.UpdateSubscriptionStatus.runScenario(UpdateSubscriptionStatus.java:50)
at com.one.externalconnectors.csp.subscriptions.UpdateSubscriptionStatus.runScenario(UpdateSubscriptionStatus.java:18)
at com.one.externalconnectors.csp.BasePartnerScenario.run(BasePartnerScenario.java:83)
... 149 more
Caused by: com.fasterxml.jackson.databind.JsonMappingException: Invalid format: "2017-05-02T00:00:00" is too short
Environment
We're using the partner center java api version 1.8.1.
The text was updated successfully, but these errors were encountered: