openactive / open-booking-api

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

Error type consistency #82

Closed nickevansuk closed 4 years ago

nickevansuk commented 6 years ago

https://openactive.io/errors/unavailable_offer

Should error types be: a) using the standard OpenActive namespace b) using the standard schema.org / OpenActive namespace case and naming convention

i.e https://openactive.io/UnavailableOfferError

ldodds commented 5 years ago

I'm thinking that to align more with our modelling elsewhere then we could instead go with:

{
  "@context": "https://openactive.io/ns/oa.jsonld",
  "type": "IncompleteCustomerDetailsError",
  "title": "Incomplete customer details",
  "details": "No customer details supplied",
  "status": 400,
  "instance": "/orders",
  "method": "POST"
}

And define a set of BookingAPIError types. This diverges slightly with RFC 7807 but continues to borrow from its model. It's also closer to what Hydra uses

nickevansuk commented 5 years ago

Also noting that the specification currently mentions that one or many errors may be returned, but does not specify a mechanism for returning an array.

nickevansuk commented 4 years ago

This feedback was incorporated, closing issue as now resolved.