Error "Invalid module output" for a custom app

Hey Makers,
I’m trying to build an app for our remberg API to allow file uploads. Unfortunatley I’m stuck with the error message, after the API request got processed successfully. (file got uploaded to our solution)

    "type": "error",
    "array": "Invalid module output. Expected Object, but found Array.",
    "_engineData": {
        "calledAt": "Not available"

The response I’m getting looks like:

    "Invalid module output",
            "_id": "xxxxx",
            "createdAt": "2023-02-10T10:59:37.687Z",
            "updatedAt": "2023-02-10T10:59:37.687Z",
            "originalName": "remberg docs.png",
            "name": "remberg docs (2).png",
            "ancestors": [],
            "fileType": "image/png",
            "description": "",
            "isFolder": false,
            "isPublic": false,
            "size": 11316

I cannot find any practical advice in the documentation and I’m running out of ideas what to do.

It seems that you have the wrong output format.
If you selected the Action module type, then the output should be an object.
In case of a Seacrh module, it should be an array.
So in your case, I suggest you have Action module, but your API is returning an array.
Try to wrap the output into an object, and it should fix the issue.

//You probably have this: 
"response": {
        "output": "{{body}}"
//Try this instead. I added the result key 
"response": {
        "output": {

Thank you for your help, now it works like a charm. :relaxed: