(buf)
| 1350 | // Walk CortexErrorDetails. user_error_message, short_error and full_error |
| 1351 | // usually contain the same text at increasing verbosity — pick one. |
| 1352 | const readErrorDetails = (buf) => { |
| 1353 | const ed = parseFields(buf); |
| 1354 | for (const fnum of [1, 2, 3]) { |
| 1355 | const f = getField(ed, fnum, 2); |
| 1356 | if (f) { |
| 1357 | const s = f.value.toString('utf8').trim(); |
| 1358 | if (s) return s.split('\n')[0].slice(0, 300); |
| 1359 | } |
| 1360 | } |
| 1361 | return ''; |
| 1362 | }; |
| 1363 | |
| 1364 | // Error info lives at either CortexTrajectoryStep.error_message (field 24 |
| 1365 | // for ERROR_MESSAGE steps) or CortexTrajectoryStep.error (field 31 for any |
no test coverage detected