fili icon indicating copy to clipboard operation
fili copied to clipboard

DimensionApiRequestMapper should throw contracted exception

Open ghost opened this issue 7 years ago • 0 comments

While running a debugging session, I accidentally noticed this line of code:

https://github.com/yahoo/fili/blob/master/fili-core/src/main/java/com/yahoo/bard/webservice/web/DimensionApiRequestMapper.java#L62

By interface contract, apply should throw RequestValidationException instead of BadApiRequestException

Another consequence is a bug where dimension servlet won't be able to catch error from requestMapper.apply(apiRequest, containerRequestContext):

https://github.com/yahoo/fili/blob/master/fili-core/src/main/java/com/yahoo/bard/webservice/web/endpoints/DimensionsServlet.java#L156

ghost avatar Jun 06 '18 20:06 ghost