Closed embano1 closed 4 years ago
this sounds like a very reasonable request to improve the connector sdk.
+1 However, I closed this issue since BeginMapBuilder() spawns a goroutine [1], which currently calls log.Fatal() for any error returned. According to #44 this is encouraged until we come up with a general approach of error propagation in the SDK.
Right now, when using the connector SDK and the connector client cannot connect/reach OpenFaaS gateway, it fails with a not very user friendly log.Fatal error:
In larger and more complex programs using the SDK this can get tricky to debug.
Instead, it should return an error (or <-chan error since it's spawning a goroutine) so users of the SDK can handle the error appropriately (retry, wrap the error, use different logging [related #6 ]).