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

Extend a problem by stacktrace, too. #38

Open
SchulteMarkus opened this issue Mar 9, 2020 · 5 comments
Open

Extend a problem by stacktrace, too. #38

SchulteMarkus opened this issue Mar 9, 2020 · 5 comments
Labels
enhancement New feature or request

Comments

@SchulteMarkus
Copy link
Contributor

Zalando problem supports stacktraces as part of an API "problem" response, see https://github.com/zalando/problem#stack-traces-and-causal-chains

{
  "type": "about:blank",
  "title": "Unprocessable Entity",
  "status": 400,
  "stacktrace": [
    "org.example.Example.execute(Example.java:17)",
    "org.example.Example.main(Example.java:11)"
  ]
}

Feature request
This extension provides stacktraces, too

Additional context

@CrystalMethod
Copy link
Contributor

Thx. This should definitely be made configurable. Personally, I don't want to present internal exceptions to the user. But there may be other use cases. Or like you have implemented as a "devmode" feature.

@SchulteMarkus
Copy link
Contributor Author

@CrystalMethod You mentioned https://github.com/SchulteMarkus/quarkus-problem-extension/commit/251a8cb67b84825e5504de978cd67aef97a11bf4 cannot be used for time being, as because of native image there has additional work to be done. I think 251a8c would be a good start. What additional work has to be done?

@CrystalMethod
Copy link
Contributor

I had a closer look at your solution for stacktraces. Without having actually tried it in native mode, I can imagine that this solution also works in native mode. I was referring to the use of the solution described here to publish stacktraces. Zalando is using SPI/Service Loader and this wan't work in native mode out of the box.

@SchulteMarkus
Copy link
Contributor Author

Ah I see.
So maybe integrate https://github.com/SchulteMarkus/quarkus-problem-extension/commit/251a8cb67b84825e5504de978cd67aef97a11bf4 into this extension? And maybe a follow up issue for making this behavior configurable.

@SchulteMarkus
Copy link
Contributor Author

@CrystalMethod ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants