Skip to content

Commit

Permalink
add info to docs
Browse files Browse the repository at this point in the history
  • Loading branch information
efgpinto committed Feb 13, 2025
1 parent db57d79 commit c3dae46
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion docs/src/modules/java/pages/grpc-endpoints.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,13 @@ To signal an error in the response, throw a `GrpcServiceException` as shown in t
include::example$event-sourced-customer-registry/src/main/java/customer/api/CustomerGrpcEndpointImpl.java[tag=exception]
----

ifdef::todo[TODO: add more details on exception handling after fix for bubble up and details in dev mode]
In addition to the special `GrpcServiceException`s and `StatusRuntimeException`, exceptions are handled like this:

* `IllegalArgumentException` is turned into a `INVALID_ARGUMENT`
* Any other exception is turned into a `INTERNAL` error.
** In production the error is logged together with a correlation
id and the response message only includes the correlation id to not leak service internals to an untrusted client.
** In local development and integration tests the full exception is returned as response body.

== Interacting with other components ==

Expand Down

0 comments on commit c3dae46

Please sign in to comment.