0

The application has classes that uses quarkus-reactive-client to request external information. Also this classes has a provider to map http errors to a custom exception.

In prod mode all works fine but in dev mode, for default, instead of returned my custom exception, the method returns a ArcUndeclaredThrowableException.

If the property quarkus.arc.dev-mode.monitoring-enabled is set to false, all works fine in dev mode.

I try to understand what does this property do and why it changes the behaviour in dev mode.

Thanks.

Rest client

@Path("/")
@RegisterRestClient
@ClientHeaderParam(name = "Connection", value = "close")
@RegisterProviders({
    @RegisterProvider(value = OidcClientRequestReactiveFilter.class),
    @RegisterProvider(value = SomeResponseExceptionMapper.class)})
@Consumes(MediaType.APPLICATION_JSON)
@Produces(MediaType.APPLICATION_JSON)
public interface SomeClient {

  @GET
  @Path("/some/url/{identifier}")
  SomeDTO search(@PathParam("identifier") String identifier)
      throws CustomException;

Method use rest client method

  private SomeDTO search(String identifier) throws CustomException {
    try {
      return someClient.search(identifier);
    } catch (CustomException e) {
      ....
    }
    return null;
  }

Error console

(executor-thread-0) io.quarkus.arc.ArcUndeclaredThrowableException: Error invoking subclass method
diaz
  • 1
  • 1
  • 3

0 Answers0