p4runtime-go-client
p4runtime-go-client copied to clipboard
Handle and parse error
Only the top level error is handled today. We need a way to be able to parse the individual update errors in a batch
@antoninbas Any insight on this ?
That sounds like the right thing to do.
At the moment, we call the Write
RPC and return the error from the gRPC as is: https://github.com/antoninbas/p4runtime-go-client/blob/0c0dbfb137b1479732ab1078fb05e8740c5e65f1/pkg/client/client.go#L146-L147
We should probably extract the inner errors and return a custom Golang error type which is more user-friendly.
Feel free to take a stab at this if you have some cycles.