API lambda issue

Hi, I am trying to build API on lambda, that will be called by panel app

When authorisation proceed this function in lambda return response:

exports.handler = async (event) => {
    let myObject = {};
    myObject.data = {};
    //myObject.data.name = 'Martin';
    //myObject.data.id = 5;
    // TODO implement
    const response = {
        statusCode: 200,
        body: JSON.stringify(myObject),
    };
    return response;
};

However, something is wrong as the response is not working and I think, I am getting “error”:“Failed to fetch panel data”. I was trying to reaturn empty response, but still not working.

I am using json template from documentation in pipedrive.

    {
    	"type": "object",
    	"required": [
    		"id",
    		"name",
    		"email"
    	],
    	"properties": {
    		"id": {
    			"$ref": "#/definitions/numerical"
    		},
    		"name": {
    			"$ref": "#/definitions/text"
    		},
    		"email": {
    			"$ref": "#/definitions/email"
    		},
    		"date": {
    			"label": "Created",
    			"$ref": "#/definitions/date-time"
    		},
    		"balance": {
    			"$ref": "#/definitions/currency"
    		}
    	}
    }

Maybe it is related to the fact, that the response is not object?

this is the response

{
  "data": {}
}

Hi,
You would find an example response here

Feel free to create a new topic if the issue still persists