ExceptionWrapper take out backtrace setter from initialize stage #51568
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.
Motivation / Background
This is my first PR to rails, I couldn't locate any similar or identical issues documented or discussed.
The backtrace of errors starts exhibiting the following output post the Rails 7.08 => Rails 7.1 update:
The last attempt I made was to create a new database migration, which hasn't been migrated yet. An error occurred, indicating 'You have 1 pending migration.' The error traceback is as follows when I tried to fetch kaminari paginated page from api:
This error isn't exclusive to Kaminari. I've attempted to isolate the issue by removing gems individually, but each time, I encounter the same backtrace, albeit with a different gem's view route (such as Active Admin or Devise).
There could be other gems interfering with the middleware, but I'm uncertain what's necessary to establish a backtrace at the initialization stage.
This Pull Request has been created because, I believe it resolves the initialization backtrace error, thereby resolving the main issue at hand.
Detail
This Pull Request changes ActionDispatch ExeptionWrapper class, and removes backtrace attribute to be set on initializing stage.
Additional information
N/A
Checklist
Before submitting the PR make sure the following are checked:
[Fix #issue-number]