Let's say I am working in ServiceA which calls ServiceB. Now if ServiceB returns NotFound, AlreadyExists or InvalidArgument error codes, what should we return to the caller of ServiceA?
Based on documentation to gRPC error code, it looks like
Internalis what we should return ifinvariants expected by the underlying system have been broken
I am not very sure what this bold text means, does it mean any downstream error should be returned as
Internalerror code?For example,
NotFounddocumentation says:NotFound means some requested entity (e.g., file or directory) was not found
Does that mean we should parse the downstream error and return
NotFoundto the caller ofServiceAifServiceBreturnsNotFound?