diff --git a/okap-errors.proto b/okap-errors.proto new file mode 100644 index 0000000..c407c05 --- /dev/null +++ b/okap-errors.proto @@ -0,0 +1,27 @@ +syntax = "proto3"; +option go_package = "whiteboxsystems.nl/okap"; + +enum OKAPErrorCode { + None = 0; + // Invalide configuratie voor de gekozen methode + InvalidXISAuthConfiguration = 1; + // Onbekende reference meegegeven + UnkownReference = 2; + // Invalide registratietoken voor deze reference + InvalidRegistrationToken = 3; + // Onbekende service + UnknownService = 4; + // Onbekende protocol + UnknownProtocol = 5; + // Invalide procotol configuratie voor het aangegeven protocol + InvalidProcotolConfig = 6; + // Authenticatie methode onbekend + UnknownAuthMethod = 7; + // Invalide authorizatie configuratie voor het aangegeven protocol + InvalidProcotolAuthConfig = 8; +} + +message OKAPError { + OKAPErrorCode code = 1; + string message = 2; +} diff --git a/okap.proto b/okap.proto index d28e931..6e7bd34 100644 --- a/okap.proto +++ b/okap.proto @@ -1,4 +1,5 @@ syntax = "proto3"; +import "okap-errors.proto"; option go_package = "whiteboxsystems.nl/okap"; service OKAP { @@ -41,18 +42,6 @@ message ProtocolAuthConfiguration { map configuration = 2; } -// Errors is meta met bovenliggende GRPC error INVALID_ARGUMENT err -// Enum met door ons gedefinieerde codes - -// enum ErrorCode { -// -//} - -// message Error { -// ErrorCode code = 1; -// string message = 2; -// } - enum SubscriptionPolicy { subnone = 0; optin = 1; @@ -166,8 +155,7 @@ message PatientRegistrationData { message PatientRegistrationError { int32 index = 1; - int32 code = 2; - string message = 3; + OKAPError error = 2; } message UpdatePatientRegistrationRequest {