You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
georgeberar
changed the title
Ignore custom exception constructors at startup
[Question] Ignore custom exception constructors at startup
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
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.
The text was updated successfully, but these errors were encountered: