Skip to content

Commit 0923975

Browse files
authored
add documentation about if statement in error block (#314)
* add documentation about if statement in erorr block * improve location and description of error-scoped definitions * Remove unnecessary sentence
1 parent f4e0a0f commit 0923975

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

docs/references.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1061,6 +1061,11 @@ message MyMessage {
10611061
> Within the error block, the `error` variable can be used as a special variable when evaluating CEL.
10621062
> [A detailed description of this variable is here](./cel.md#error)
10631063
1064+
## (grpc.federation.message).def.call.error.def
1065+
`def` defines a variable scoped to the entire error block.
1066+
1067+
It is important to note that definitions scoped at the top level of the error block will be evaluated before `error.if`.
1068+
10641069
## (grpc.federation.message).def.call.error.if
10651070

10661071
`if` specifies condition in CEL. If the condition is `true`, it returns defined error information.
@@ -1594,4 +1599,4 @@ In summary, it looks like this.
15941599

15951600
1. For the response message of rpc, the request message fields are the message arguments.
15961601
2. For other messages, the parameters explicitly passed in `def.message.args` option are the message arguments.
1597-
3. You can access to the message argument with `$.` prefix.
1602+
3. You can access to the message argument with `$.` prefix.

0 commit comments

Comments
 (0)