Hi! I know there is no error schema support or anything related to API errors, but how to approach errors with ROM-HTTP? For example when creating a resource:
POST /users with some attributes, resulting a 400 Bad request with following body:
No issue so far. It is perfectly correct now, but I think there could be some room for an improvement. Now, there are 2 places to check on a specific endpoint definition, instead of one. I mean, a signature of an endpoint also includes the errors it can returns, so it would make more sense to describe this signature in a single place (on relation). If this goes well with rom paradigm, I think it would be a nice feature to have in the future, or at least worth taking it into consideration.
EDIT: This applies to domain errors, like ‘pay request fails due to insufficient funds’. For, other types of errors which are related to the protocol, they can go on a response handler.