Skip to content

Commit 61fdabc

Browse files
Updated testsuite result_kind to use nested ErrorSet (#469)
* Updated eval.proto with nested Status message instead of google.rpc.Status * Updated the field documentaions in suite.proto.
1 parent 5949a82 commit 61fdabc

File tree

2 files changed

+25
-3
lines changed

2 files changed

+25
-3
lines changed

proto/cel/expr/BUILD.bazel

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ proto_library(
7272
strip_import_prefix = "/proto",
7373
deps = [
7474
":value_proto",
75-
"@com_google_googleapis//google/rpc:status_proto",
75+
"@com_google_protobuf//:any_proto",
7676
],
7777
)
7878

proto/cel/expr/eval.proto

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ syntax = "proto3";
1616

1717
package cel.expr;
1818

19+
import "google/protobuf/any.proto";
1920
import "cel/expr/value.proto";
20-
import "google/rpc/status.proto";
2121

2222
option cc_enable_arenas = true;
2323
option go_package = "cel.dev/expr";
@@ -104,9 +104,31 @@ message ExprValue {
104104
//
105105
// The errors included depend on the context. See `ExprValue.error`.
106106
message ErrorSet {
107-
repeated google.rpc.Status errors = 1;
107+
// Errors that could come up during evaluation phase.
108+
repeated Status errors = 1;
108109
}
109110

111+
// Each `Status` message contains three pieces of data: error code, error message,
112+
// and error details.
113+
//
114+
// You can find out more about this error model and how to work with it in the
115+
// [API Design Guide](https://cloud.google.com/apis/design/errors).
116+
//
117+
// Status value is intended to be wire and field compatible with `google.rpc.Status`.
118+
message Status {
119+
// The status code, which should be an enum value of [google.rpc.Code][].
120+
int32 code = 1;
121+
122+
// A developer-facing error message, which should be in English. Any
123+
// user-facing error message should be localized and sent in the
124+
// [Status.details][] field, or localized by the client.
125+
string message = 2;
126+
127+
// A list of messages that carry the error details. There is a common set of
128+
// message types for APIs to use.
129+
repeated google.protobuf.Any details = 3;
130+
}
131+
110132
// A set of expressions for which the value is unknown.
111133
//
112134
// The unknowns included depend on the context. See `ExprValue.unknown`.

0 commit comments

Comments
 (0)