openactive / open-booking-api

Repository for the Open Booking API specification
Other
2 stars 3 forks source link

Move IncompleteOrderItemError to Order level #175

Closed nickevansuk closed 3 years ago

nickevansuk commented 3 years ago

IncompleteOrderItemError should be included in 10.2.2.1 Order Creation - OrderQuote, OrderProposal and Order error responses, at an Order level.

The error is essenetially the result of a bad request (as there is a missing acceptedOffer or orderedItem property on the OrderItem), therefore we do not need to throw an OrderItem level error, but rather an Order level error, as it will be clear to the caller where the null value is being passed, and therefore does not require as much work for the booking system implementer.

IncompleteOrderItemError should also be updated to return a status code of 400, given that it results from a badly formed request.

nickevansuk commented 3 years ago

Further implementation experience has shown that it is actually more work for implementers to include this at the Order level. Additionally moving this to the Order level limits extensibility for e.g. #120 which may be have an optional acceptedOffer property.

Hence this proposal has been rescinded