Skip to content

Commit e2dd973

Browse files
committed
feat: introduce Error message and update NodeExecutionResult to use shared.Error
1 parent 37f1469 commit e2dd973

2 files changed

Lines changed: 16 additions & 7 deletions

File tree

proto/shared/shared.errors.proto

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ package shared;
44

55
option ruby_package = "Tucana::Shared";
66

7+
import "shared.struct.proto";
8+
79
message ServiceError {
810
string message = 1;
911
repeated ServiceErrorDetails details = 2;
@@ -19,3 +21,14 @@ message ServiceActiveModelError {
1921
string attribute = 1;
2022
string type = 2;
2123
}
24+
25+
message Error {
26+
string code = 1; //e.g. T-STD-000123
27+
string category = 2; //e.g. InvalidArgument
28+
string message = 3; //e.g. Expected number as argument but received list
29+
int64 timestamp = 4; // epoch timestamp in milliseconds
30+
string version = 5; // version of service which produced the error
31+
map<string, string> dependencies = 6;
32+
shared.Struct details = 7;
33+
34+
}

proto/shared/shared.execution_result.proto

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,12 @@ package shared;
55
option ruby_package = "Tucana::Shared";
66

77
import "shared.struct.proto";
8+
import "shared.errors.proto";
89

910
message NodeParameterNodeExecutionResult {
1011
shared.Value value = 5;
1112
}
1213

13-
message RuntimeError {
14-
string code = 1;
15-
optional string description = 2;
16-
}
17-
1814
message NodeExecutionResult {
1915

2016
int64 node_id = 1;
@@ -25,7 +21,7 @@ message NodeExecutionResult {
2521

2622
oneof result {
2723
shared.Value success = 5;
28-
RuntimeError error = 6;
24+
shared.Error error = 6;
2925
}
3026

3127
}
@@ -43,7 +39,7 @@ message ExecutionResult {
4339
// Result of executed flow
4440
oneof result {
4541
shared.Value success = 7;
46-
RuntimeError error = 8;
42+
shared.Error error = 8;
4743
}
4844

4945
}

0 commit comments

Comments
 (0)