DestinationAPI - Violation beim Withdraw eines ChangeRequest

Description of the bug:

Wird beim Withdraw eines Change-Requests auf PATCH /v1/destinations/{destinationId}/limits nur der Status gesendet, weist der ZSD mit einer Violation ab.

Current behavior:

  • requestReason muss gesetzt sein
  • values (limits) müssen gesetzt sein

Expected behavior:

Für das Zurückziehen eines ChangeRequests sollte es nicht notwendig sein die Limit-Values oder einen requestReson zu senden.

Environments:

TEST

Additional Information:

ErrorCode: "errorcode":"85bc49b2-d8d1-4987-b41c-4c43101dbd5d"

Violation:

["attachments.receive.changeRequest.requestReason: must not be null","attachments.receive.changeRequest.requestReason: must not be empty","attachments.receive.changeRequest.values: must not be null"],"errorcode":"85bc49b2-d8d1-4987-b41c-4c43101dbd5d"

LOG-Output vom SDK

11:29:24.307 [main] INFO  d.f.f.c.h.i.ApiRequestInterceptor Received response 400 for PATCH on https://test.fit-connect.fitko.dev/destination-api/v1/destinations/1b7d1a24-a6c8-4050-bb71-ae3749ec432f/limits in 34.9ms 

dev.fitko.fitconnect.api.exceptions.client.FitConnectDestinationException: Could not send limit change request for destination 1b7d1a24-a6c8-4050-bb71-ae3749ec432f

	at dev.fitko.fitconnect.client.DestinationClient.wrapExceptions(DestinationClient.java:199)
	at dev.fitko.fitconnect.client.DestinationClient.requestLimitChange(DestinationClient.java:192)
	at dev.fitko.fitconnect.integrationtests.DestinationClientIT.testWithdrawLimitChangeRequest(DestinationClientIT.java:321)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at java.base/java.util.ArrayList.forEach(ArrayList.java:1541)
	at java.base/java.util.ArrayList.forEach(ArrayList.java:1541)
**Caused by: dev.fitko.fitconnect.api.exceptions.internal.RestApiException: {"type":"https://schema.fitko.de/fit-connect/submission-api/problems/constraint-violation","title":"Bad Request","status":400,"detail":"Invalid request content.","instance":"/destination-api/v1/destinations/1b7d1a24-a6c8-4050-bb71-ae3749ec432f/limits","violations":["attachments.receive.changeRequest.requestReason: must not be null","attachments.receive.changeRequest.requestReason: must not be empty","attachments.receive.changeRequest.values: must not be null"],"errorcode":"85bc49b2-d8d1-4987-b41c-4c43101dbd5d"}**
	at dev.fitko.fitconnect.core.http.DefaultHttpClient.evaluateStatusAndRespond(DefaultHttpClient.java:237)
	at dev.fitko.fitconnect.core.http.DefaultHttpClient.patch(DefaultHttpClient.java:182)
	at dev.fitko.fitconnect.core.destination.DestinationApiService.requestLimitChange(DestinationApiService.java:105)
	at dev.fitko.fitconnect.client.DestinationClient.lambda$requestLimitChange$9(DestinationClient.java:192)
	at dev.fitko.fitconnect.client.DestinationClient.wrapExceptions(DestinationClient.java:197)

Dependency / relationship to other issues:

Änderung der API-Spec Doc in MR#22 ist hinfällig, hier wurde nur die Doku passend zu Spec angepasst.

Responsible person / team:

Contact persons including contact details:

Screenshots / Logs / Requests:

Checklist:

  • Add Severity label
  • Add team label
  • Related/affected issues/stories/epics linked and explained in the bug issue
  • Creation of an automated test
  • Bugfix deployed on DEV
  • Bugfix tested on DEV
  • Bugfix deployed on TEST
  • Bugfix tested on TEST (possibly also by the connection project itself)
  • Successful fix reported to Team Operations (Teams channel)
  • Bugfix deployed on STAGE
  • Bugfix tested on STAGE if necessary
  • Bugfix deployed on PROD
  • Bugfix tested on PROD (possibly also by the connection project itself)
  • Final communication by Team Operations if necessary
  • Internal documentation was checked and updated if necessary
  • External documentation has been checked and updated if necessary
  • Updated changelog if necessary

Approach/Solution:

Release version of the artifact:

Assignee Loading
Time tracking Loading