Repository navigation
Commit ad6a6b9
committed
fix(sql-execute): fall back to exception type when error message is null
SqlExecuteNode#executeSqlQuery reads e.getMessage() straight into both the
user-facing streamed text ("SQL执行失败: " + errorMessage) and
SqlRetryDto.sqlExecute(). NPE, StackOverflowError and several JDBC driver
wrappers carry a null message, so the UI rendered the literal
"SQL执行失败: null" and the retry reason stored null.
Fall back to the exception class name when the message is blank, so the
user always sees an actionable reason. The logged stack trace is
unchanged.
Add a regression test that throws a message-less RuntimeException and
asserts no "null" leaks into the streamed text while the failure notice
and retry reason are still produced.1 parent 27e7baa commit ad6a6b9
2 files changed
Lines changed: 23 additions & 1 deletion
File tree
- data-agent-management/src
- main/java/com/alibaba/cloud/ai/dataagent/workflow/node
- test/java/com/alibaba/cloud/ai/dataagent/workflow/node/sql
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
152 | 152 | | |
153 | 153 | | |
154 | 154 | | |
155 | | - | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
156 | 158 | | |
157 | 159 | | |
158 | 160 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
237 | 237 | | |
238 | 238 | | |
239 | 239 | | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
240 | 260 | | |
241 | 261 | | |
242 | 262 | | |
| |||
0 commit comments