Skip to content

[Bug] API mismatch: Client Web intent responses don't match Server definitions #3692

@ashutosh-engineer

Description

@ashutosh-engineer

Problem

When sending a message to SUSI.AI web client (e.g., "tell me a joke"), the Server sometimes returns a response format with properties like answer.text and answer.source, whereas Web UI expects response.answer. This discrepancy can break response rendering.

Steps to Reproduce

  1. Open https://susi.ai
  2. Send a chat intent like "tell me a joke"
  3. Inspect the network response JSON
  4. Notice mismatch in property names (e.g., answer.text vs response.answer)

Expected Behavior

Client and server should share consistent response schema:

  • Either Server sends response.answer
  • Or Web client handles both answer.text & response.answer

Suggested Fix

  • Validate API response schema in Server /cms/intent endpoints
  • Update Web client chat logic to handle both cases
  • Add sample API contract in documentation (README or developer docs)

Happy to submit a PR aligning schema or updating Web parser logic!

Labels: bug, good first issue, api, help wanted

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