Closed vikasbo closed 4 years ago
@vikasbo thank you for reporting this issue, and I am pleased to share that it will be resolved with the next official release. To ensure that this issue does not happen again a date formatter was added to the code to ensure the date is in YYYY-MM-DD format
@isaiahwilliams Thank you for the response. Could you share the timeline for the next release? Thanks.
Please also let me know if there is a work around?
@vikasbo version 1.15.3 has just been released. Included in that release is a fix for this particular issue. Please let us know if you encounter any other issues.
Try fetching AuditLogs for customer, results in a runtime exception:
Steps to reproduce
Expected behavior
Expected to initialize and then iterate via the code below:
for (AuditRecord auditRecord : auditRecordsPage.getItems()) {
But fails to initialize lazy collection
SeekBasedResourceCollection<AuditRecord> auditRecordsPage
.Actual behavior
Apparently, using the Java API, the API expects DateTime but throws exception asking date to be entered in YYYY-MM-DD.
This is the reason error is not clear. DateTime stores dates internally, and the API does not accept string, so how do we send the Date in YYYY-MM-DD format.
Diagnostic logs
See below:
Error/Stacktrace below.
| Server running. Browse to http://localhost:8080/webdata customer.getCompanyProfile().getCompanyName() = ABC Associates Fetching audit logs for dates = 2020-02-01T00:00:00.000+05:30 and 2020-02-04T00:00:00.000+05:30 Default logger ERROR: Partner service failed response:{ "message": "The given date '2020-02-01T00:00:00.000 05:30' was not recognized as a valid DateTime. Please enter in 'YYYY-MM-DD' format." } | Error PartnerException: ErrorCategory: BAD_INPUT, ServiceErrorPayload: Error code: null Error message: null com.microsoft.store.partnercenter.models.ApiFault@599b0148 , Context: Request Id: 9f0ebc85-a415-4073-b801-0ab9c0888886, Correlation Id: en-US, Locale: {2}00000000-0000-0000-0000-000000000000, Base Description: com.microsoft.store.partnercenter.exception.PartnerException | Error at com.microsoft.store.partnercenter.errorhandling.DefaultPartnerServiceErrorHandler.handleFailedResponse(DefaultPartnerServiceErrorHandler.java:96) | Error at com.microsoft.store.partnercenter.network.PartnerServiceClient.handleResponse(PartnerServiceClient.java:599) | Error at com.microsoft.store.partnercenter.network.PartnerServiceClient.get(PartnerServiceClient.java:225) | Error at com.microsoft.store.partnercenter.network.PartnerServiceClient.get(PartnerServiceClient.java:271) | Error at com.microsoft.store.partnercenter.auditrecords.AuditRecordsCollection.query(AuditRecordsCollection.java:125) | Error at in.webdataconsulting.jbilling.server.integration.partnercenter.MicrosoftPartnerCenterIntegrationTask.doExecute(MicrosoftPartnerCenterIntegrationTask.java:122) | Error at com.sapienter.jbilling.server.process.task.ScheduledTask.execute(ScheduledTask.java:151) | Error at org.quartz.core.JobRunShell.run(JobRunShell.java:202) | Error at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:573) order.getId() = 28a3d2b0-e07f-4738-8bda-ff94e51c92d4
Environment