automa icon indicating copy to clipboard operation
automa copied to clipboard

The quotation marks are not escaped correctly

Open Liang0info opened this issue 1 year ago • 0 comments

Describe the bug I expect a POST request with the body below should be sent after my workflow failed. {"errorMessage": "{{workflow.errorMessage}}"}

However, an illegal JSON body below was sent. It seems that the quotation marks are not escaped correctly. {"errorMessage": "Unexpected token \'<\', "<!doctype "... is not valid JSON"}

To Reproduce Steps to reproduce the behavior:

  1. Create a workflow that will error. For example, send an HTTP request that expects the response to be JSON but the actual response is HTML.
  2. Make the workflow send a POST request with the body below after it fails. {"errorMessage": "{{workflow.errorMessage}}"}
  3. An illegal JSON body below was sent. {"errorMessage": "Unexpected token \'<\', "<!doctype "... is not valid JSON"}

Expected behavior A legal JSON body with correctly escaped quotation marks should be sent. {"errorMessage": "Unexpected token \'<\', \"<!doctype \"... is not valid JSON"}

Screenshots Expect: pic1 Actual: pic2

Desktop (please complete the following information):

  • OS: Windows
  • Browser: Google Chrome
  • Extension Version: v1.28.27

Additional context No additional context

Liang0info avatar May 28 '24 22:05 Liang0info