openTdataCH / ojp-nova

Interface between OJP and NOVA to return an OJPFareDelivery
1 stars 0 forks source link

An invalid request still results in a 200 answer from the service #50

Open ue71603 opened 1 month ago

ue71603 commented 1 month ago

Request sent


<?xml version="1.0" encoding="UTF-8"?>
<OJP xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.siri.org.uk/siri" version="1.0" xmlns:ojp="http://www.vdv.de/ojp" xsi:schemaLocation="http://www.siri.org.uk/siri ../ojp-xsd-v1.0/OJP.xsd">
  <OJPRequest>
    <ServiceRequest>

    </ServiceRequest>
  </OJPRequest>
</OJP>

response body and 200 code:

**

<body>
  <h1>HTTP/1.1 400 Bad Request</h1>
</body>

**

skinkie commented 1 month ago

Is there anything in the protocol specification that it should trigger HTTP-errors. I think it would be a good practice to do so, but I don't recall the OJP or SIRI specs do.

ue71603 commented 1 month ago

No. they don't need to. The assumption would be that we still return valid XML with error messages. However, MENTZ doesn't do it, so if we receive a 400er, then we probably should pass it on... This is currently on my todolist, if ok.