Broker needs more robust error passing between broker methods and the handlers #730
Labels
tech-debt
triage/unresolved
Indicates an issue that can not or will not be resolved.
unplanned
Issue is recognized but not planned for any release
The way we're passing errors back from the broker layer to the handlers is not very flexible and should be improved. Today, the handlers basically just switch on the error string contents to detect which type was returned, but this doesn't leave any room for variability in the descriptions passed to the platform.
We need to start thinking about broker error types, preferably OSB centric. High level OSB Errors types should be defined so the broker can return them and the right thing just happens at the HTTP layer. Right now, we're employing the bad habit of extending
broker.goreturn signatures to continue to report additional values.My desire is to be able to flexibly introduce a new
BrokerErrortype that abroker.goreturns in the event of a semantic error, and have the handler layer generically understand how to deal with that. It probably involves some set of methods likeStatusCode(),Description(), etc.The text was updated successfully, but these errors were encountered: