Skip to content

Commit 72dfbd3

Browse files
Merge pull request #260 from code0-tech/214-flowtype-datatype-and-runtimefunctionservices-need-proper-errors
Add detailed errors to update requests
2 parents f9d121b + 70ae96f commit 72dfbd3

8 files changed

Lines changed: 35 additions & 0 deletions

proto/sagittarius/sagittarius.action_configuration.proto

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ option ruby_package = "Tucana::Sagittarius";
55
package sagittarius;
66

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

910
// Request for updating a action configuration
1011
message ActionConfigurationUpdateRequest {
@@ -18,6 +19,7 @@ message ActionConfigurationUpdateRequest {
1819
message ActionConfigurationUpdateResponse {
1920
// True if was successful, false if not
2021
bool success = 1;
22+
optional shared.Error error = 2;
2123
}
2224

2325
service ActionConfigurationService {

proto/sagittarius/sagittarius.data_type.proto

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ option ruby_package = "Tucana::Sagittarius";
55
package sagittarius;
66

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

910
// Request for updating a data type
1011
message DataTypeUpdateRequest {
@@ -16,6 +17,7 @@ message DataTypeUpdateRequest {
1617
message DataTypeUpdateResponse {
1718
// True if was successful, false if not
1819
bool success = 1;
20+
optional shared.Error error = 2;
1921
}
2022

2123
service DataTypeService {

proto/sagittarius/sagittarius.flow_type.proto

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ option ruby_package = "Tucana::Sagittarius";
44

55
package sagittarius;
66

7+
import "shared.errors.proto";
78
import "shared.flow_definition.proto";
89

910
// Request for updating a list of adapter flow types
@@ -16,6 +17,7 @@ message FlowTypeUpdateRequest {
1617
message FlowTypeUpdateResponse {
1718
// True if was successful, false if not
1819
bool success = 1;
20+
optional shared.Error error = 2;
1921
}
2022

2123
//This service will be implemented as a server by Sagittarius and as a client by Aquila.

proto/sagittarius/sagittarius.function.proto

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ option ruby_package = "Tucana::Sagittarius";
44

55
package sagittarius;
66

7+
import "shared.errors.proto";
78
import "shared.function.proto";
89

910
// Request for updating a list of function definitions
@@ -16,6 +17,7 @@ message FunctionDefinitionUpdateRequest {
1617
message FunctionDefinitionUpdateResponse {
1718
// True if was successful, false if not
1819
bool success = 1;
20+
optional shared.Error error = 2;
1921
}
2022

2123
//This service will be implemented as a server by Sagittarius and as a client by Aquila.

proto/sagittarius/sagittarius.runtime_function.proto

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ option ruby_package = "Tucana::Sagittarius";
44

55
package sagittarius;
66

7+
import "shared.errors.proto";
78
import "shared.runtime_function.proto";
89

910
// Request for updating a list of runtime function definitions
@@ -16,6 +17,7 @@ message RuntimeFunctionDefinitionUpdateRequest {
1617
message RuntimeFunctionDefinitionUpdateResponse {
1718
// True if was successful, false if not
1819
bool success = 1;
20+
optional shared.Error error = 2;
1921
}
2022

2123
//This service will be implemented as a server by Sagittarius and as a client by Aquila.

proto/sagittarius/sagittarius.runtime_status.proto

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ syntax = "proto3";
22

33
package sagittarius;
44

5+
import "shared.errors.proto";
56
import "shared.runtime_status.proto";
67

78
option ruby_package = "Tucana::Sagittarius";
@@ -16,6 +17,7 @@ message RuntimeStatusUpdateRequest {
1617

1718
message RuntimeStatusUpdateResponse {
1819
bool success = 1;
20+
optional shared.Error error = 2;
1921
}
2022

2123
service RuntimeStatusService {

proto/sagittarius/sagittarius.runtime_usage.proto

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ syntax = "proto3";
22

33
package sagittarius;
44

5+
import "shared.errors.proto";
56
import "shared.runtime_usage.proto";
67

78
option ruby_package = "Tucana::Sagittarius";
@@ -12,6 +13,7 @@ message RuntimeUsageRequest {
1213

1314
message RuntimeUsageResponse {
1415
bool success = 1;
16+
optional shared.Error error = 2;
1517
}
1618

1719
service RuntimeUsageService {

proto/shared/shared.errors.proto

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
syntax = "proto3";
2+
3+
package shared;
4+
5+
option ruby_package = "Tucana::Shared";
6+
7+
message Error {
8+
string message = 1;
9+
repeated ErrorDetails details = 2;
10+
}
11+
12+
message ErrorDetails {
13+
oneof kind {
14+
ActiveModelError active_model_error = 1;
15+
}
16+
}
17+
18+
message ActiveModelError {
19+
string attribute = 1;
20+
string type = 2;
21+
}

0 commit comments

Comments
 (0)