Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DimensionApiRequestMapper should throw contracted exception #714

Open
QubitPi opened this issue Jun 6, 2018 · 0 comments
Open

DimensionApiRequestMapper should throw contracted exception #714

QubitPi opened this issue Jun 6, 2018 · 0 comments
Assignees
Labels

Comments

@QubitPi
Copy link
Contributor

QubitPi commented Jun 6, 2018

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant