You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@fineract.apache.org by "Michael Vorburger (Jira)" <ji...@apache.org> on 2020/11/07 00:43:00 UTC

[jira] [Commented] (FINERACT-1168) Integration Tests failure due to internal server errors should show server side failure stack trace

    [ https://issues.apache.org/jira/browse/FINERACT-1168?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17227673#comment-17227673 ] 

Michael Vorburger commented on FINERACT-1168:
---------------------------------------------

I thought about this again today, because of FINERACT-1256...

> We could customize the amount of information that is returned with something like this:

[~aleks] I don't understand how that (above) could include the Stack Trace to solve the problem described (but I may not understand enough it). And even if we did do that, we would still need to change all integration tests to "capture" (from the HTTP response) and "rethrow" (to the test) such internal server error exceptions - it's possible, but not completely trivial. I think the route that [~ptuomola] outlined is more promising.

I've played with this today, but still can't get [https://github.com/bmuschko/gradle-cargo-plugin] to show me the output which the WAR logs to STDOUT in the {{./gradlew test}} output.. even with {{cargo \{ local { logLevel = 'high' }} in {{build.gradle}} - it seems like it's "swallowed" somewhere. I've even configured to logback to log to STDERR instead of STDOUT (using \{{<appender name="CONSOLE" target="System.err" class="ch.qos.logback.core.ConsoleAppender">}}) hoping that may help - but it doesn't.

> FINERACT-764 might (probably) gives us this "for free"?

So then that's probably the right route forward, here; progress on this issue is blocked by FINERACT-764.

In the mean time, I've raised https://github.com/apache/fineract/pull/1495/files proposing that we reduce the logging to only show WARN & ERROR, no INFO. That doesn't solve this, of course, but it should to reduce logging spewed by running tests in preparation for FINERACT-764.

> Integration Tests failure due to internal server errors should show server side failure stack trace
> ---------------------------------------------------------------------------------------------------
>
>                 Key: FINERACT-1168
>                 URL: https://issues.apache.org/jira/browse/FINERACT-1168
>             Project: Apache Fineract
>          Issue Type: Improvement
>            Reporter: Michael Vorburger
>            Priority: Blocker
>
> IT failures like FINERACT-1167, already raised in FINERACT-927, are a PITA (impossible) to debug.
> This is an IT failure due to a #500 means "something internal went wrong on the server" - but we don't know what...
> To know what the problem was, the server should return the exception in the HTTP body of the 500 response. The IT should then capture that, and include it in the JUnit test failure.
> But in production, 500 errors should NOT show the stack trace - that is typically considered a security problem. So we need some env var / sys prop to enable it, just for debugging. Spring Boot probably actually already has some... knob, for this?
> [~ptuomola] thought this may interest you.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)