Should we not expose the response code if we, in a service, throw a ServiceException?
Version
4.0.0
Context
In vertx-web-api-service;
When a web api service throws/fails ServiceException, then the reply handler simply "ignore" the exception, and fails the RoutingContext with a 500 Internal server error and the error message.
IMHO, we should check for the exception type, and if not a ServiceException we could fail with 500.
Do you have a reproducer?
No. But have a look at RouteToEBServiceHandlerImpl.handle() method.
res.cause() could be either a ServiceException or a completely different exception.
Questions
Should we not expose the response code if we, in a service, throw a ServiceException?
Version
4.0.0
Context
In vertx-web-api-service; When a web api service throws/fails
ServiceException
, then the reply handler simply "ignore" the exception, and fails the RoutingContext with a 500 Internal server error and the error message.IMHO, we should check for the exception type, and if not a
ServiceException
we could fail with 500.Do you have a reproducer?
No. But have a look at
RouteToEBServiceHandlerImpl.handle()
method.res.cause()
could be either aServiceException
or a completely different exception.