The GitHub Actions job "Release Auditing" on 
texera.git/backport/7638-handle-falsy-model-throws-v1.2 has failed.
Run started by GitHub user github-actions[bot] (triggered by 
github-actions[bot]).

Head commit for run:
453c0d6ad1e177c0ea16e40691c92e16bb3af38f / anthonychengit 
<[email protected]>
fix(agent-service): handle falsy model throws (#7638)

### What changes were proposed in this PR?

The model adapter can throw arbitrary JavaScript values, including
`null` and `undefined`. The previous error path immediately read
`error.name`, so those values caused `sendMessage` itself to reject
instead of returning Texera's normal error result.

```text
Before: falsy model throw -> error.name dereference -> rejected sendMessage
After:  falsy model throw -> normalized error text -> resolved ReAct error step
```

This change safely normalizes thrown values and uses optional access for
optional error metadata. The regression test covers `null`, `undefined`,
`false`, `0`, and the empty string, and verifies both the resolved
response and its recorded error step.

### Any related issues, documentation, discussions?

Closes #7485

### How was this PR tested?

```bash
npx --yes [email protected] test src/agent/texera-agent.spec.ts
npx --yes [email protected] run typecheck
npx --yes [email protected] run format:check
```

The test file passed 56 tests. Type checking and formatting checks also
passed.

### Was this PR authored or co-authored using generative AI tooling?

(backported from commit 14a574f0cfd6feab99c90b58fb1492ce76d68b15)

Generated-by: OpenAI Codex (GPT-5)

Report URL: https://github.com/apache/texera/actions/runs/33292157157

With regards,
GitHub Actions via GitBox

Reply via email to