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

Consider providing guidance on exception handling #49

Open
lmsurpre opened this issue Aug 15, 2018 · 1 comment · May be fixed by #137
Open

Consider providing guidance on exception handling #49

lmsurpre opened this issue Aug 15, 2018 · 1 comment · May be fixed by #137
Assignees
Labels

Comments

@lmsurpre
Copy link

I used this guide to refresh my JAX-RS knowledge. Unfortunately, when I went to apply that, I was getting a 500 error back in my client but there was nothing useful in the server logs (even with debug tracing).

It turned out to be a dumb mistake on my part (ArrayOutOfBoundsException), but is there a suggested way for configuring a root exception handler so that future mistakes like that would at least get logged?

I ended up following the advice at https://stackoverflow.com/a/19680115/161022 to register an ExceptionMapper and inserted a log statement there. If that is the recommended approach, it might be nice to add something like that to this guide so that anyone starting from here will have unhandled exceptions logged for them. Let me know if I'm missing something!

@AustinSeto
Copy link

When running the application included in the guide using the goal mvn liberty:run or mvn liberty:dev logs are created in the directory target/liberty/wlp/usr/servers/defaultServer/logs. Errors appear in .log files generated there.

May be worth it to mention these logs, but this probably isn't a good way to handle this. Unsure if exception handling should be included in the intro guide or if it should be in its own guide.

@AustinSeto AustinSeto linked a pull request Jul 27, 2020 that will close this issue
@AustinSeto AustinSeto linked a pull request Jul 27, 2020 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants