diff --git a/databroker/src/grpc/kuksa_val_v2/conversions.rs b/databroker/src/grpc/kuksa_val_v2/conversions.rs index a2262d81..dd9e455c 100644 --- a/databroker/src/grpc/kuksa_val_v2/conversions.rs +++ b/databroker/src/grpc/kuksa_val_v2/conversions.rs @@ -460,7 +460,7 @@ impl broker::UpdateError { format!("Value out of bounds (id: {})", id), ), broker::UpdateError::UnsupportedType => tonic::Status::new( - tonic::Code::Unimplemented, + tonic::Code::InvalidArgument, format!("Unsupported type (id: {})", id), ), broker::UpdateError::PermissionDenied => tonic::Status::new( diff --git a/databroker/src/grpc/kuksa_val_v2/val.rs b/databroker/src/grpc/kuksa_val_v2/val.rs index fd0d05a8..f7ee6865 100644 --- a/databroker/src/grpc/kuksa_val_v2/val.rs +++ b/databroker/src/grpc/kuksa_val_v2/val.rs @@ -336,7 +336,7 @@ impl proto::val_server::Val for broker::DataBroker { // PERMISSION_DENIED if access is denied for the actuator. // UNAUTHENTICATED if no credentials provided or credentials has expired // UNAVAILABLE if there is no provider currently providing the actuator - // OUT_OF_RANGE is the provided value is out of the min/max range specified + // OUT_OF_RANGE if the provided value is out of the min/max range specified // DATA_LOSS is there is a internal TransmissionFailure // INVALID_ARGUMENT // - if the data type used in the request does not match @@ -402,7 +402,7 @@ impl proto::val_server::Val for broker::DataBroker { // PERMISSION_DENIED if access is denied for any of the actuators. // UNAUTHENTICATED if no credentials provided or credentials has expired // UNAVAILABLE if there is no provider currently providing an actuator - // OUT_OF_RANGE is the provided value is out of the min/max range specified + // OUT_OF_RANGE if the provided value is out of the min/max range specified // DATA_LOSS is there is a internal TransmissionFailure // INVALID_ARGUMENT // - if the data type used in the request does not match @@ -514,7 +514,7 @@ impl proto::val_server::Val for broker::DataBroker { // PERMISSION_DENIED // - if access is denied for any of the signals. // UNAUTHENTICATED if no credentials provided or credentials has expired - // OUT_OF_RANGE is the provider is out of the min/max range specified + // OUT_OF_RANGE if the published value is out of the min/max range specified // INVALID_ARGUMENT // - if the data type used in the request does not match // the data type of the addressed signal @@ -585,7 +585,6 @@ impl proto::val_server::Val for broker::DataBroker { // PERMISSION_DENIED if access is denied for any of the signals. // UNAUTHENTICATED if no credentials provided or credentials has expired // ALREADY_EXISTS if a provider already claimed the ownership of an actuator - // UNAUTHENTICATED if permission expired // // - Provider sends PublishValuesRequest -> Databroker returns PublishValuesResponse // GRPC errors are returned as messages in the stream @@ -593,7 +592,7 @@ impl proto::val_server::Val for broker::DataBroker { // NOT_FOUND if a signal is non-existant. // PERMISSION_DENIED // - if access is denied for a signal. - // OUT_OF_RANGE is the provider is out of the min/max range specified + // OUT_OF_RANGE if the published value is out of the min/max range specified // INVALID_ARGUMENT // - if the data type used in the request does not match // the data type of the addressed signal diff --git a/proto/kuksa/val/v2/val.proto b/proto/kuksa/val/v2/val.proto index 793de678..278893b3 100644 --- a/proto/kuksa/val/v2/val.proto +++ b/proto/kuksa/val/v2/val.proto @@ -49,9 +49,9 @@ service VAL { // PERMISSION_DENIED if access is denied for any of the signals. // INVALID_ARGUMENT if the request is empty or provided path is too long // - // When subscribing the Broker shall immediately return the value for all - // subscribed entries. If no value is available when subscribing a DataPoint - // with value None shall be returned. + // When subscribing, Databroker shall immediately return the value for all + // subscribed entries. + // If a value isn't available when subscribing to a Datapoint, it should return None // rpc Subscribe(SubscribeRequest) returns (stream SubscribeResponse); @@ -62,9 +62,9 @@ service VAL { // PERMISSION_DENIED if access is denied for any of the signals. // INVALID_ARGUMENT if the request is empty // - // When subscribing the Broker shall immediately return the value for all - // subscribed entries. If no value is available when subscribing a DataPoint - // with value None shall be returned. + // When subscribing, Databroker shall immediately return the value for all + // subscribed entries. + // If a value isn't available when subscribing to a Datapoint, it should return None // rpc SubscribeById(SubscribeByIdRequest) returns (stream SubscribeByIdResponse); @@ -75,7 +75,7 @@ service VAL { // PERMISSION_DENIED if access is denied for the actuator. // UNAUTHENTICATED if no credentials provided or credentials has expired // UNAVAILABLE if there is no provider currently providing the actuator - // OUT_OF_RANGE is the provided value is out of the min/max range specified + // OUT_OF_RANGE if the provided value is out of the min/max range specified // DATA_LOSS is there is a internal TransmissionFailure // INVALID_ARGUMENT // - if the data type used in the request does not match @@ -94,7 +94,7 @@ service VAL { // PERMISSION_DENIED if access is denied for any of the actuators. // UNAUTHENTICATED if no credentials provided or credentials has expired // UNAVAILABLE if there is no provider currently providing an actuator - // OUT_OF_RANGE is the provided value is out of the min/max range specified + // OUT_OF_RANGE if of the provided actuators values are out of the min/max range specified // DATA_LOSS is there is a internal TransmissionFailure // INVALID_ARGUMENT // - if the data type used in the request does not match @@ -120,7 +120,7 @@ service VAL { // PERMISSION_DENIED // - if access is denied for any of the signals. // UNAUTHENTICATED if no credentials provided or credentials has expired - // OUT_OF_RANGE is the provider is out of the min/max range specified + // OUT_OF_RANGE if the published value is out of the min/max range specified // INVALID_ARGUMENT // - if the data type used in the request does not match // the data type of the addressed signal @@ -143,7 +143,6 @@ service VAL { // PERMISSION_DENIED if access is denied for any of the signals. // UNAUTHENTICATED if no credentials provided or credentials has expired // ALREADY_EXISTS if a provider already claimed the ownership of an actuator - // UNAUTHENTICATED if permission expired // // - Provider sends PublishValuesRequest -> Databroker returns PublishValuesResponse // GRPC errors are returned as messages in the stream @@ -151,7 +150,7 @@ service VAL { // NOT_FOUND if a signal is non-existant. // PERMISSION_DENIED // - if access is denied for a signal. - // OUT_OF_RANGE is the provider is out of the min/max range specified + // OUT_OF_RANGE if the published value is out of the min/max range specified // INVALID_ARGUMENT // - if the data type used in the request does not match // the data type of the addressed signal