Skip to content

Commit f38837b

Browse files
committed
chore(doc): updated the refs to the interceptors pkg
Signed-off-by: Mohamed Tahar KEDJOUR <mkedjour@cisco.com>
1 parent 5ef4f4f commit f38837b

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

docs/contribute/backend/context.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@ The context is propagated to the application and domain services, as well as to
99
For example, repositories use the tenant ID from the context to filter data using the custom GORM scope [`BelongsToTenant`](https://github.com/agntcy/identity-service/blob/main/backend/internal/pkg/gormutil/scopes.go),
1010
while HTTP clients can use the context to cancel requests if the user closes the connection to the server.
1111

12-
The population of the `Context` with user and tenant metadata is managed by the [`AuthInterceptor`](https://github.com/agntcy/identity-service/blob/main/backend/internal/pkg/interceptors/auth.go) gRPC interceptor.
12+
The population of the `Context` with user and tenant metadata is managed by the [`AuthInterceptor`](https://github.com/agntcy/identity-service/blob/main/backend/internal/bff/grpc/interceptors/auth.go) gRPC interceptor.

docs/contribute/backend/errors.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ Since only two types of errors are returned from the Application layer, error ha
3737

3838
- If the error is a *domain error*, a [`status.Status`](https://pkg.go.dev/google.golang.org/grpc/status#Status) is returned with a code corresponding to the `DomainError.Reason` field.
3939
- If the error is a *technical error*, it is forwarded as-is.
40-
Later, a custom gRPC interceptor [`ErrorInterceptor`](https://github.com/agntcy/identity-service/blob/main/backend/internal/pkg/interceptors/error.go) logs the error and returns a [`status.Status`](https://pkg.go.dev/google.golang.org/grpc/status#Status) with an `Internal` code as a response.
40+
Later, a custom gRPC interceptor [`ErrorInterceptor`](https://github.com/agntcy/identity-service/blob/main/backend/internal/bff/grpc/interceptors/error.go) logs the error and returns a [`status.Status`](https://pkg.go.dev/google.golang.org/grpc/status#Status) with an `Internal` code as a response.
4141

4242
The helper function [`grpcutil.Error()`](https://github.com/agntcy/identity-service/blob/main/backend/internal/pkg/grpcutil/errors.go) encapsulates the error handling process described above and can be called from gRPC services, as shown in the following example:
4343

docs/contribute/backend/logging.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ What log level to use?
6060

6161
## Error logging
6262

63-
In case an unexpected error happened and the execution flow needs to be stopped, **do not** log the error, there is a global gRPC interceptor [`ErrorInterceptor`](https://github.com/agntcy/identity-service/blob/main/backend/internal/pkg/interceptors/error.go) that catches these errors and logs them.
63+
In case an unexpected error happened and the execution flow needs to be stopped, **do not** log the error, there is a global gRPC interceptor [`ErrorInterceptor`](https://github.com/agntcy/identity-service/blob/main/backend/internal/bff/grpc/interceptors/error.go) that catches these errors and logs them.
6464
This prevents errors from being logged more than once, which facilitates tracing.
6565

6666
## Formats

0 commit comments

Comments
 (0)