{"record":{"id":"741e91be2bca65d7","repo":"risingwavelabs/risingwave","slug":"test-error","errorCode":null,"errorMessage":"test_error","messagePattern":"test_error","errorType":"error_code","errorClass":"StreamExecutorError","httpStatus":null,"severity":"info","filePath":"src/stream/src/executor/error.rs","lineNumber":178,"sourceCode":"    }\n}\n\nimpl StreamExecutorError {\n    pub fn variant_name(&self) -> &str {\n        self.0.inner().as_ref()\n    }\n}\n\nstatic_assertions::const_assert_eq!(std::mem::size_of::<StreamExecutorError>(), 8);\n\n#[cfg(test)]\nmod tests {\n    use risingwave_common::bail;\n\n    use super::*;\n\n    fn func_return_error() -> StreamExecutorResult<()> {\n        bail!(\"test_error\")\n    }\n\n    #[test]\n    #[should_panic]\n    #[ignore = \"manual UI check: only prints the error/backtrace for human inspection\"]\n    fn executor_error_ui_test_1() {\n        // For this test, ensure that we have only one backtrace from error when panic.\n        func_return_error().unwrap();\n    }\n\n    #[test]\n    #[ignore = \"manual UI check: only prints the error/backtrace for human inspection\"]\n    fn executor_error_ui_test_2() {\n        // For this test, ensure that we have only one backtrace from error when panic.\n        func_return_error().map_err(|e| println!(\"{:?}\", e)).ok();\n    }\n}\n","sourceCodeStart":160,"sourceCodeEnd":196,"githubUrl":"https://github.com/risingwavelabs/risingwave/blob/6469eb736d691e8e9b8a419a57edd6429ca77417/src/stream/src/executor/error.rs#L160-L196","documentation":"A panic (via the `bail!` macro) raised inside a test helper `func_return_error` in the stream executor's test module. `bail!` returns `Err(StreamExecutorError::msg(\"test_error\"))`, and the test's panic is used to exercise the executor error Display/backtrace rendering for manual UI inspection. It is not a production error path.","triggerScenarios":"Running the ignored tests `executor_error_ui_test_1` or `executor_error_ui_test_2` explicitly with `cargo test -- --ignored` (they are `#[ignore = \"manual UI check\"]` and `#[should_panic]`); the helper `func_return_error` calls `bail!(\"test_error\")`.","commonSituations":"Developers manually verifying how `StreamExecutorError` backtraces look in logs; contributors touching the error type or tracing setup who run ignored tests.","solutions":["No fix needed: this is an intentional panic in a `#[should_panic] #[ignore]` test used for manual UI inspection.","If you did not expect it, ensure you are not running the test with `--include-ignored`; it is meant to be run only for manual checks."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"// Not needed in normal development. Only run for manual UI checks:\n// cargo test -p risingwave_stream executor_error_ui_test -- --ignored --nocapture\n// The test is #[should_panic], so a panic is the expected outcome.","preventionTips":["Do not run ignored #[should_panic] tests in CI or as part of general test runs.","Treat any \"test_error\" panic in logs as coming from this manual UI-check test, not production code."],"tags":["test-only","stream-executor","panic","error-display"],"backgroundTag":"invalid-argument-value","analyzedSha":"6469eb736d691e8e9b8a419a57edd6429ca77417","analyzedAt":"2026-09-11T21:06:21.487Z","contentChangedAt":"2026-09-11T21:06:21.487Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}