Skip to content

Error: Response type "text" is not supported #62

@erroneous0ne

Description

@erroneous0ne

Component Bug Report

Useful Links

Link to the SQUIZ freshdesk ticket.

Description

The XML Attachment to JSON action doesn’t work with files downloaded to the Maester internal storage. When attachmentUrl is selected in the Mapping URL and a conversion is attempted, an error will occur. The issue does not originate from the file, since when the same public download URL is entered directly into the XML component’s Mapping URL, the conversion completes successfully.

Starting your Docker container ...
[INFO  tini (1)] Spawned child process 'node' with pid '7'
invokeModuleFunction – startup is not found
invokeModuleFunction – init is not found
Fully initialized and waiting for messages
Checking if incoming messages is lightweight...
Checking if incoming messages is lightweight...
About to process message...
Message processed, going to emit
[INFO  tini (1)] Spawned child process 'node' with pid '7'
Error: Response type "text" is not supported
    at ObjectStorage.getDataByResponseType (/home/node/node_modules/@elastic.io/maester-client/dist/src/ObjectStorage.js:28:28)
    at ObjectStorage.getOne (/home/node/node_modules/@elastic.io/maester-client/dist/src/ObjectStorage.js:68:21)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async AttachmentProcessor.getMaesterAttachment (/home/node/node_modules/@elastic.io/component-commons-library/dist/src/attachment/AttachmentProcessor.js:75:26)
    at async TaskExec.processAction (/home/node/lib/actions/attachmentToJson.js:64:20)
invokeModuleFunction – init is not found
Checking if incoming messages is lightweight...
Checking if incoming messages is lightweight...
Fully initialized and waiting for messages
Checking if incoming messages is lightweight...
Processing attachment
Attachment to XML started
Found 1 attachments
Error occurred during trigger or action processing

Component Version

1.4.0

Steps to Reproduce

  1. Obtain any .xml file - you can use a public download link.
  2. Download the file via the REST API or any other component capable of saving files to Maester storage.
  3. Ensure the file is saved in Maester storage.
  4. Copy the attachmentUrl and paste it into the XML Attachment to JSON action’s Mapping URL field.
  5. Attempt to retrieve a sample.

You can reproduce this issue in this simple Academia flow.

Actual Result

Image

Expected Result

The file is successfully converted, and valid JSON output is produced.

Workaround(s)

If the link is publicly accessible, paste URL into the Mapping URL field and download directly from it

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions