Jens-G opened a new pull request, #3759: URL: https://github.com/apache/thrift/pull/3759
[THRIFT-6163](https://issues.apache.org/jira/browse/THRIFT-6163) When a handler crashes, `thrift_processor:handle_error/5` puts the crash term and the Erlang stack trace into the `TApplicationException` it sends back to the caller. `exceptions_include_traces` ships as `true` in `lib/erl/src/thrift.app.src`, so that is what an unmodified deployment does. The trace names internal modules and the source paths of the machine that built the release. This is what the client actually received in the failing test, verbatim: ``` {thrift_processor,handle_function,3, [{file,"/thrift/src/lib/erl/src/thrift_processor.erl"},{line,128}]} ``` ### It is not only the stack `handle_unknown_exception/5` reaches `handle_error/5` for any exception the IDL did not declare, wrapping the thrown term into the error it forwards. So the term the *handler* threw goes to the caller as well — the application's own data rather than Thrift's, and nothing here can bound what a handler puts in it. ### Change Default `exceptions_include_traces` to `false`. The switch stays: anyone who wants traces on the wire sets it and gets them unchanged, and the crash is still logged locally in full through `error_logger` either way. Release note under `lib/erl/README.md`. `test/erl/src/thrift_test.app.src` carried the same variable, but `handle_error/5` reads it out of the `thrift` application, not `thrift_test`, so nothing could ever read that copy. Removed rather than flipped — leaving it at either value advertises a knob that does nothing. ### Tests Three over a real socket: the two failure routes into `handle_error/5` under the shipped configuration, and one that sets the variable and checks the trace still comes back, so this stays a change of default rather than a removal. The first two fail against the previous default. They call `application:load(thrift)` first, and that turns out to matter — with the code merely on the code path `application:get_env/2` answers `undefined`, the fallback branch runs, and a test that skips the load passes against the old default. `rebar3 eunit` on OTP 25: 324 → 327 tests, 0 failures. 🤖 Generated with [Claude Code](https://claude.com/claude-code) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
