Closed uynap closed 4 years ago
Linked Issue https://github.com/anz-bank/sysl-go/issues/105
Implemented in https://github.com/anz-bank/sysl-go/pull/188. Pattern of use:
ctx = common.ProvisionRestResult(ctx) // provision for the result in the context
response, err := client.PostRestFooBarWithArg(ctx, &request)
result := common.GetRestResult(ctx) // retrieve the result from the context
For example, UI -> BFF -> OtherAPI, when OtherAPI response:
At the moment, the BFF will response UI:
without any details.
I know the raw message from the OtherAPI can be logged in sysl-go, but it’s hard to access the OtherAPI's customised error messages in BFF's handler functions. There are some use cases that the UI needs to present different things base on the error message received from the OtherAPI.