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

Automatically configure ProblemModule based on include-stacktrace Property #708

Open
schmitzhermes opened this issue Nov 10, 2021 · 0 comments · May be fixed by #727
Open

Automatically configure ProblemModule based on include-stacktrace Property #708

schmitzhermes opened this issue Nov 10, 2021 · 0 comments · May be fixed by #727
Labels

Comments

@schmitzhermes
Copy link

Hi all.
I was wondering why the existing Spring property server.error.include-stacktrace is not picked up by default from the framework, especially looking at the problem-spring-web-autoconfigure module.

Detailed Description

Currently, my setup looks something like this:

@Bean
    fun problemModule(@Value("\${server.error.include-stacktrace:NEVER}") includeStacktrace: ErrorProperties.IncludeStacktrace): Module {
        return ProblemModule().withStackTraces(includeStacktrace == ErrorProperties.IncludeStacktrace.ALWAYS)
    }

I could imagine building this into this class directly.

Context

I would like to reduce the amount of custom code for error handling to the minimum and I could imagine others thinking the same.

Possible Implementation

see above

Your Environment

  • Version used: 0.28.0-RC0
  • Link to your project: private
@sokomishalov sokomishalov linked a pull request Dec 29, 2021 that will close this issue
6 tasks
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.

1 participant