Skip to content

Commit 703a841

Browse files
Update 20-exception-handing.mdx
1 parent 99d198e commit 703a841

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

website/docs/20-server/20-exception-handing.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ Method annotated with `@GrpcExceptionHandler` must return one of the following t
3535
Implement `GrpcExceptionResolver` to process `IllegalArgumentException`:
3636

3737
```java
38-
@Bean
38+
@Component
3939
public class IllegalArgumentExceptionResolver implements GrpcExceptionResolver {
4040
@Override
4141
public StatusRuntimeException resolve(Throwable throwable, ServerCall<?, ?> call, Metadata headers) {
@@ -56,7 +56,7 @@ This interface is generally used for exception reporting.
5656
Send exception to [Sentry](https://sentry.io/welcome/) when unhandled exception occurs:
5757

5858
```java
59-
@Bean
59+
@Component
6060
public class SentryExceptionReporter implements GrpcUnhandledExceptionProcessor {
6161
@Override
6262
public void process(Throwable throwable, ServerCall<?, ?> call, Metadata headers) {

0 commit comments

Comments
 (0)