the stage dlp issued a warning after completing an application. The developer's assessment:
Die [Meldung] bezieht sich darauf, dass die Bestellung im MDM nicht aktualisiert werden konnte. Ist das so OK?
[...] F眉r mich sieht das so aus, dass der Location Header in der Antwort vom MDM leer war. Aktuell wird das von uns so interpretiert, dass etwas schiefgelaufen ist. Hat sich da am MDM etwas ge盲ndert?
I think this is not right (but also not a huge problem, I guess). @rreitmann what kind of information do you need?
I could file a new application for testing purposes on stage
connection to #2753 ?
Could be connected to #2759
@UteH The MDM always sends the Location-Header when the Order-update succeeds. In case of any error a 4xx or 5xx is returned with error details in the body. I have turned off concurrency detection which lead to errors in #2759 (optimistic locking errors). However if the DLP tries to save the order with state ORDERED several times, only the first attempt will succeed. All further attempts to modifiy the order will result in a 400 with order-management.error.order-already-completed in the body.
@UteH Please retest and let me know if the error still occurs...
mmmh, error message still comes up on stage
@UteH Is this the message which we are talking about?
Es ist ein Fehler beim abschlie脽enden Leeren des Warenkorbs im Rechercheportal aufgetreten, bitte geben Sie formlos xxx Bescheid.
I was able to reproduce the above message on test. The order in the MDM was not updated at all.Therefore I guess that the json provided by the DLP contains an error. Tomorrow I will extend logging on our side in order to capture the json which is sent by the DLP.
Jap that's the error message.
Thanks!
@UteH I have logged all requests going to the "/api/orders"-endpoint on test.metadata.fdz.dzhw.eu. I can see the first GET request coming from Drupal, when the shopping-cart is handed over to the DLP. At the end of the order process there is only a GET request arriving at test.metadata.fdz.dzhw.eu, no PUT for updates.
Are you sure that you are sending the completed order to the correct system (stage -> test.metadata.fdz.dzhw.eu, prod -> metadata.fdz.dzhw.eu)? If I manually PUT a completed order to the endpoint, everything works as expected...
@UteH I have slightly modified my previous comment.
It seems that the problem occurs only on our stage system which connects to test.metadata.fdz.dzhw.eu.
Yes I am sure that we send a PUT request. We also get a 200 response and the shopping cart is successfully emptied afterwards.
In the response, we check for a location header. If no location header is set we interpret this as an error:
if (empty($request->getHeader('Location'))) {
// Error handling...
}
Maybe this does just not make sense and we better should check for the response code 200?
On the production site which connects to metadata.fdz.dzhw.eu this header seems to be set - otherwise we would observe the same behavior there too.
@harlor: I am pretty sure that the stage system does not send a PUT request because of the following symptoms:
2021-03-05 08:26:25.702 TRACE 1 --- [nio-8080-exec-8] org.zalando.logbook.Logbook : {"origin":"remote","type":"request","correlation":"9a87cc8bcdf0b54f","protocol":"HTTP/1.1","remote":"93.190.68.76","method":"GET","uri":"https://test.metadata.fdz.dzhw.eu/api/orders/6041eb2bfc761e3aee774864","host":"test.metadata.fdz.dzhw.eu","path":"/api/orders/6041eb2bfc761e3aee774864","scheme":"https","port":"443","headers":{"host":["test.metadata.fdz.dzhw.eu"],"user-agent":["Drupal/8.9.13 (+https://www.drupal.org/) GuzzleHttp/6.5.5 curl/7.64.0 PHP/7.3.16"],"x-amzn-trace-id":["Root=1-6041eb31-13cbf41d7e05e8ce297210b8"],"x-forwarded-port":["443"],"x-forwarded-proto":["https"]}}
2021-03-05 08:26:25.713 TRACE 1 --- [nio-8080-exec-8] org.zalando.logbook.Logbook : {"origin":"local","type":"response","correlation":"9a87cc8bcdf0b54f","duration":8,"protocol":"HTTP/1.1","status":200,"headers":{"Cache-Control":["max-age=0, must-revalidate, public"],"Content-Type":["application/json"],"Date":["Fri, 05 Mar 2021 08:26:25 GMT"],"ETag":["\"0\""],"Last-Modified":["Fri, 05 Mar 2021 08:26:19 GMT"],"Strict-Transport-Security":["max-age=31536000 ; includeSubDomains"],"Transfer-Encoding":["chunked"],"X-Content-Type-Options":["nosniff"],"X-XSS-Protection":["1; mode=block"]},"body":{"version":0,"createdDate":"2021-03-05T08:26:19.215","createdBy":"anonymousUser","lastModifiedDate":"2021-03-05T08:26:19.215","lastModifiedBy":"anonymousUser","id":"6041eb2bfc761e3aee774864","languageKey":"de","state":"CREATED","client":"MDM","products":[{"dataAcquisitionProjectId":"gra2005","study":{"id":"stu-gra2005$","title":{"de":"DZHW-Absolventenpanel 2005","en":"DZHW Graduate Panel 2005"},"annotations":{"de":"dies ist eine annotation"},"surveyDataTypes":[{"de":"Quantitative Daten","en":"Quantitative Data"}],"studySeries":{"de":"DZHW-Absolventenstudien","en":"DZHW Graduate Survey Series"}},"accessWay":"download-cuf","version":"2.2.1","dataFormats":["Stata","SPSS"]}]}}
2021-03-05 08:28:22.361 TRACE 1 --- [nio-8080-exec-3] org.zalando.logbook.Logbook : {"origin":"remote","type":"request","correlation":"ca1724658f6f5c90","protocol":"HTTP/1.1","remote":"93.190.68.76","method":"GET","uri":"https://test.metadata.fdz.dzhw.eu/api/orders/6041eb2bfc761e3aee774864","host":"test.metadata.fdz.dzhw.eu","path":"/api/orders/6041eb2bfc761e3aee774864","scheme":"https","port":"443","headers":{"content-type":["application/json"],"host":["test.metadata.fdz.dzhw.eu"],"user-agent":["Drupal/8.9.13 (+https://www.drupal.org/) GuzzleHttp/6.5.5 curl/7.64.0 PHP/7.3.16"],"x-amzn-trace-id":["Root=1-6041eba6-7c236e6443f17851725b9eb5"],"x-forwarded-port":["443"],"x-forwarded-proto":["https"]}}
2021-03-05 08:28:22.369 TRACE 1 --- [nio-8080-exec-3] org.zalando.logbook.Logbook : {"origin":"local","type":"response","correlation":"ca1724658f6f5c90","duration":6,"protocol":"HTTP/1.1","status":200,"headers":{"Cache-Control":["max-age=0, must-revalidate, public"],"Content-Type":["application/json"],"Date":["Fri, 05 Mar 2021 08:28:22 GMT"],"ETag":["\"0\""],"Last-Modified":["Fri, 05 Mar 2021 08:26:19 GMT"],"Strict-Transport-Security":["max-age=31536000 ; includeSubDomains"],"Transfer-Encoding":["chunked"],"X-Content-Type-Options":["nosniff"],"X-XSS-Protection":["1; mode=block"]},"body":{"version":0,"createdDate":"2021-03-05T08:26:19.215","createdBy":"anonymousUser","lastModifiedDate":"2021-03-05T08:26:19.215","lastModifiedBy":"anonymousUser","id":"6041eb2bfc761e3aee774864","languageKey":"de","state":"CREATED","client":"MDM","products":[{"dataAcquisitionProjectId":"gra2005","study":{"id":"stu-gra2005$","title":{"de":"DZHW-Absolventenpanel 2005","en":"DZHW Graduate Panel 2005"},"annotations":{"de":"dies ist eine annotation"},"surveyDataTypes":[{"de":"Quantitative Daten","en":"Quantitative Data"}],"studySeries":{"de":"DZHW-Absolventenstudien","en":"DZHW Graduate Survey Series"}},"accessWay":"download-cuf","version":"2.2.1","dataFormats":["Stata","SPSS"]}]}}
In this case I don't understand the following behaviour:

What exactly do you not understand? The response body is { "version": 1, "id": ... }, response headers are not displayed in your client (you need to click on the arrow).
Ah yes everything was fine in the client. I noticed that we send the PUT via http instead of https and the GuzzleHttp client didn't handle this. I still wonder how we got a 200 response w/o Location header... However - changing the URL to https worked. Thanks for your help.
@harlor Just tested this and can confirm that everything works as expected now :smile: Great, thank you!