Skip to content

## Frontend Error: "Invalid message ID" when rating a message in ChatWindow #32

@ackuser

Description

@ackuser

Description

When attempting to rate a message in the chat interface, the following runtime error occurs in the browser console:

ERROR Invalid message ID at Nt.rateMessage (static/js/bundle.js:126098:13) at async Object.W [as rateMessage] (static/js/bundle.js:126469:7) at async onChange (static/js/vendors-node_modules_mongodb-chatbot-ui_build_ChatWindow_js.chunk.js:63893:42)

Image

Steps to Reproduce

  1. Open the chat UI.
  2. Attempt to rate a message.
  3. Observe the error in the browser console.

Expected Behavior

Rating a message should not throw an error and should work as expected.

Actual Behavior

An "Invalid message ID" error is thrown, and the rating action fails.

Additional Context

  • The error appears to originate from the ChatWindow component in the mongodb-chatbot-ui package.
  • It seems that rateMessage is being called with an invalid or missing message ID.

Environment

  • Browser: Google Chrome 136.0.7103.114
  • Node.js: v22.15.0
  • OS: macOS 15.4.1 (Darwin 24.4.0, BuildVersion: 24E263, arm64)

Possible Solution

Add validation to ensure a valid message ID is passed to rateMessage, or handle cases where the message ID is missing.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions