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

[Question] Ignore custom exception constructors at startup #29

Open
georgeberar opened this issue Jan 21, 2020 · 0 comments
Open

[Question] Ignore custom exception constructors at startup #29

georgeberar opened this issue Jan 21, 2020 · 0 comments

Comments

@georgeberar
Copy link

georgeberar commented Jan 21, 2020

Version
1.3.0

Problem
Hi,
I'm using the @FeignExceptionConstructor with a custom exception like:
@FeignExceptionConstructor
public ExternalApiException(final Response response) {
if(response != null){
// extract info from response
log.error(...) // print the status, body and other stuff extracted from response
}
}

I know in your documentation is specified that

It's worth noting that at setup/startup time, the generators are checked with a null value of the body. If you don't do the null-checker, you'll get an NPE and startup will fail.

but this is annoying because the response will not be null and it will print multiple ERROR messages into logs when the app starts due to the 'generators checking' and they are not really errors.

Question
Is there a way of disabling this checking? Is this checking of constructors mandatory? I just don't want to fill the logs with error messages (that are not really error messages) because of it.

Thank you.

@georgeberar georgeberar changed the title Ignore custom exception constructors at startup [Question] Ignore custom exception constructors at startup Jan 21, 2020
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