numaproj / numaflow-java

Numaflow Java SDK
Apache License 2.0
22 stars 10 forks source link

feat: grpc error handling for Map/MapT/MapStream/Reduce/Sink #53

Closed xdevxy closed 1 year ago

xdevxy commented 1 year ago

Closes #769

This PR introduces a global GRPC interceptor for error handling (instead of handling cases one by one, which can be clumsy and easy to miss cases that needs to be handled). Although now exception can only happen at user custom code (application errors) which are translated to UNKNOWN grpc error code to be retried. The error handling logic can be extended easily to handle more type of exception if needed in future.

Also note that exception in reduce and sink now will no longer cause panic and exit but return with UNKNOWN grpc error to match the behavior in python and go sdk side.