Skip to content

[BUG] MTC numbered list causes DataMapper error #1124

Description

@matKlju

Bug description

When triggering a service from the widget, an MTC node containing a numbered list causes the widget to remain in a loading state indefinitely. DataMapper fails to parse the escaped list markers such as 1\. and returns SyntaxError: Bad escaped character in JSON.

Expected behavior

  • Numbered lists in MTC messages should be rendered correctly in the widget. The response should be processed successfully, and the widget should stop loading.

Screenshots:

Test widget result:

Image

Widget result:

Image

DataMapper logs:

Request: {method: POST, url: /backoffice/hbs/bot_responses_to_messages, params: {}, query: {}, body: {"data":{"authorLastName":"","chatId":"d2895fce-a5d3-4974-8693-d90dbc575f50","botMessages":[{"buttons":[],"text":"See on loendite test! \"null\"\n\n1\\. _cat_\n2\\. cat\n3\\. _cat_\n4\\. **cat**\n5\\. cat\n6\\. _cat_\n7\\. **cat**","recipient_id":"d2895fce-a5d3-4974-8693-d90dbc575f50","result":""}],"authorFirstName":"","created":"2026-07-16T12:27:14.830Z","authorTimestamp":"2026-07-16T12:27:14.830Z","authorId":"chatbot"}}}
err: SyntaxError: Bad escaped character in JSON at position 110
    at JSON.parse (<anonymous>)
    at /workspace/app/server.js:140:31
    at ExpressHandlebars.<anonymous> (/workspace/app/node_modules/express-handlebars/dist/express-handlebars.js:301:25)
    at step (/workspace/app/node_modules/express-handlebars/dist/express-handlebars.js:49:23)
    at Object.next (/workspace/app/node_modules/express-handlebars/dist/express-handlebars.js:30:53)
    at fulfilled (/workspace/app/node_modules/express-handlebars/dist/express-handlebars.js:21:58)
Response: {statusCode: 200, responseData: "{\"error\":\"There was an error executing /workspace/app/module/backoffice/hbs/bot_responses_to_messages.handlebars\"}"}

Service to test with

nummerdatud_loend_2026_07_16_15_32_56.json

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingv3.3

Type

Projects

Status
In Review

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions