octoposprime / op-be-graphql

OctopOS Prime Backend Api Gateway
http://www.octoposprime.com
MIT License
13 stars 1 forks source link

Update GetErrors Function to Include Dlr and Auth Errors #63

Closed ebrarkesici closed 3 months ago

ebrarkesici commented 3 months ago

The GetErrors function in pkg/infrastructure/adapter/service/error.go needs to be updated to include errors from Dlr and Authentication services.

dlrErrors := a.GetErrorsDynamic(ctx, "GetDlrErrors", tconfig.GetInternalConfigInstance().Grpc.DlrHost, tconfig.GetInternalConfigInstance().Grpc.DlrPort)
authenticationErrors := a.GetErrorsDynamic(ctx, "GetAuthenticationErrors", tconfig.GetInternalConfigInstance().Grpc.AuthenticationHost, tconfig.GetInternalConfigInstance().Grpc.AuthenticationPort)
pbResults.Errors = append(pbResults.Errors, dlrErrors.Errors...)
pbResults.Errors = append(pbResults.Errors, authenticationErrors.Errors...)

This update ensures that errors from Dlr and Authentication services are also included in the returned errors.