fili
fili copied to clipboard
DimensionApiRequestMapper should throw contracted exception
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