motia icon indicating copy to clipboard operation
motia copied to clipboard

fix(logs): handle non-string values in search to prevent runtime crash

Open Tanmay-008 opened this issue 3 months ago • 1 comments

Summary

The LogsPage component crashes at runtime when the backend sends a log with msg, traceId, or step that is not a string. Since the UI calls .toLowerCase() during filtering, any non-string value (null, number, object, undefined) immediately triggers a TypeError.

This PR normalizes these fields to empty strings before applying .toLowerCase(), ensuring the filtering logic never crashes even when the backend sends unexpected data types.

Related Issues

Fixes #992

Type of Change

  • [x] Bug fix
  • [ ] New feature
  • [ ] Breaking change
  • [ ] Refactor
  • [ ] Other (please describe):

Checklist

  • [x] I have read the CONTRIBUTING.md
  • [x] My code follows the code style of this project
  • [ ] I have added tests where applicable
  • [ ] I have tested my changes locally
  • [ ] I have linked relevant issues
  • [ ] I have added screenshots for UI changes (if applicable)

Screenshots (if applicable)

Additional Context

Tanmay-008 avatar Nov 30 '25 02:11 Tanmay-008

Someone is attempting to deploy a commit to the motia Team on Vercel.

A member of the Team first needs to authorize it.

vercel[bot] avatar Nov 30 '25 02:11 vercel[bot]

Hey @Tanmay-008 , Thanks for the issues, We wil discuss this internally today.

rohitg00 avatar Dec 08 '25 14:12 rohitg00