Closed piti118 closed 1 year ago
Hi @piti118,
Could you please check if PR #2361 covers your needs for stack trace? It will print out stack trace when if the user's handler returns an error
that supports %+v
like the error generated with pkg/errors
.
Hi, please check #2361 for the current status. I just merged the PR into the v1 branch and I am going to close this PR to proceed to the next release.
What is being done in this PR?
This PR fixes issue #1904. And fix the bug caused by one of the previous pr that trace will only appear on development but not test environment.
What are the main choices made to get to this solution?
Without traces it's much harder to debug. The doc is also misleading that we will get a trace but in fact we didn't. This PR fix that issue.
https://gobuffalo.io/documentation/request_handling/errors/#default-error-handling-development
List the manual test cases you've covered before sending this PR:
The tests are covered in unit tests.
On dev, test: when handler return error being (pkg/errors or context.Error()) if it contains stack trace then it should return that stack trace. On other env, trace is hidden.