diff --git a/proto/cel/expr/BUILD.bazel b/proto/cel/expr/BUILD.bazel index 588d711..5c6dba9 100644 --- a/proto/cel/expr/BUILD.bazel +++ b/proto/cel/expr/BUILD.bazel @@ -70,7 +70,7 @@ proto_library( strip_import_prefix = "/proto", deps = [ ":value_proto", - "@com_google_googleapis//google/rpc:status_proto", + "@com_google_protobuf//:any_proto", ], ) diff --git a/proto/cel/expr/eval.proto b/proto/cel/expr/eval.proto index 3f76f57..8ad8698 100644 --- a/proto/cel/expr/eval.proto +++ b/proto/cel/expr/eval.proto @@ -16,8 +16,8 @@ syntax = "proto3"; package cel.expr; +import "google/protobuf/any.proto"; import "cel/expr/value.proto"; -import "google/rpc/status.proto"; option cc_enable_arenas = true; option go_package = "cel.dev/expr"; @@ -104,9 +104,31 @@ message ExprValue { // // The errors included depend on the context. See `ExprValue.error`. message ErrorSet { - repeated google.rpc.Status errors = 1; + // Errors that could come up during evaluation phase. + repeated Status errors = 1; } + // Each `Status` message contains three pieces of data: error code, error message, + // and error details. + // + // You can find out more about this error model and how to work with it in the + // [API Design Guide](https://cloud.google.com/apis/design/errors). + // + // Status value is intended to be wire and field compatible with `google.rpc.Status`. + message Status { + // The status code, which should be an enum value of [google.rpc.Code][]. + int32 code = 1; + + // A developer-facing error message, which should be in English. Any + // user-facing error message should be localized and sent in the + // [Status.details][] field, or localized by the client. + string message = 2; + + // A list of messages that carry the error details. There is a common set of + // message types for APIs to use. + repeated google.protobuf.Any details = 3; + } + // A set of expressions for which the value is unknown. // // The unknowns included depend on the context. See `ExprValue.unknown`.