summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorClaire <claire.github-309c@sitedethib.com>2023-09-06 09:18:10 +0200
committerGitHub <noreply@github.com>2023-09-06 09:18:10 +0200
commitec48bc3610459200edc2e4a0caff12c562a242d8 (patch)
treea3f73b1f0ceb6ca7db28b66d1633e46d0b341fa2
parentd8bdba2f9fdfbb8feccfbe6cf6c42980a2ad5cc3 (diff)
Do not truncate backtrace when the `BACKTRACE` env variable is set (#26794)
-rw-r--r--lib/mastodon/sidekiq_middleware.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/mastodon/sidekiq_middleware.rb b/lib/mastodon/sidekiq_middleware.rb
index 9832e1a27c9..3a747afb63c 100644
--- a/lib/mastodon/sidekiq_middleware.rb
+++ b/lib/mastodon/sidekiq_middleware.rb
@@ -16,7 +16,7 @@ class Mastodon::SidekiqMiddleware
private
def limit_backtrace_and_raise(exception)
- exception.set_backtrace(exception.backtrace.first(BACKTRACE_LIMIT))
+ exception.set_backtrace(exception.backtrace.first(BACKTRACE_LIMIT)) unless ENV['BACKTRACE']
raise exception
end