This repository has been archived by the owner on Feb 24, 2024. It is now read-only.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.