init(code:message:metadata:cause:)
Create a new RPC error. If the given cause
is also an RPCError
sharing the same code
, then they will be flattened into a single error, by merging the messages and metadata.
init(code: Code, message: String, metadata: Metadata = [:], cause: (any Error)? = nil)