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

Introduce exception mapper - remove exception mapping code redundancy #10

Open
mlotysz opened this issue Feb 19, 2016 · 0 comments
Open

Comments

@mlotysz
Copy link
Contributor

mlotysz commented Feb 19, 2016

You map exceptions in all your resource methods:

        try {
            actor = dao.findById(id);
        } catch (DataAccessException e) {
            throw new NotFoundException(e.getMessage());
        }

Remove exception mapping code redundancy by creating exception mapper. Start here: http://www.dropwizard.io/0.9.2/docs/manual/core.html#error-handling

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

No branches or pull requests

1 participant