anthonychengit opened a new pull request, #7638:
URL: https://github.com/apache/texera/pull/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?
   
   Generated-by: OpenAI Codex (GPT-5)
   


-- 
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]

Reply via email to