Custom App generates RuntimeError: the run couldn't be completed but I can't see any logs to debug what went wrong

:bullseye: What is your goal?

troubleshoot a custom app module to performs POST action

:thinking: What is the problem & what have you tried?

I am developing a Make.com Custom App and have successfully implemented ‘Make Any API call’ universal modules and ‘GET’ modules without issue. However, I am encountering consistent HTTP 406 (Not Acceptable) or 520 (Unknown) errors when testing a ‘POST’ module with a complex object payload.

The exact same payload works perfectly when sent via the Python requests library on my local machine, suggesting the issue lies in how the Custom App serializes the request.

Another ‘POST’ module that sends a simple payload worked flawlessly.

Because the error logs in Make.com doesn’t show the full API server response, I can’t identify why the module is failing for complex payloads while working for simple ones, and how to effectively debug the raw request being sent by the Custom App.

What can I do to troubleshoot?

:clipboard: Error messages or input/output bundles

The run couldn’t be completed [406] Code: RuntimeError, The run couldn’t be completed [520] Code: ConnectionError

@skanfklwef
Welcome back!

The 406 error gives the most helpful explanation because it means that the server rejects the request due to some inconsistency in terms of either the Content-Type header, the Accept header, or the way the body gets serialized by Make. The 520 error should be a consequence of the server crash during parsing of the bad payload.

The first thing to do is to redirect the module temporarily to webhook.site instead of the API endpoint. Such setting will allow you to see what kind of raw request gets sent by Make with all headers and the body in order to compare it to the payload produced by Python requests.

In the Custom App, check whether you have explicitly added Content-Type and Accept headers to the headers of the module as application/json and in agreement with the format used in the API response. Make does not always automatically add these headers correctly for POST modules like requests do in Python when you add a json parameter.

For the sake of a test, send the very same complex payload via the native HTTP module with the help of the very same headers. If this module can successfully send the request whereas yours cannot, then the problem is in the module itself and not in the token or the connection to the API.

One thing that would help narrow this down further: can you share how you’ve defined the body mapping in your Custom App module spec? Specifically how the complex object fields are structured there? That would help pinpoint whether the serialization is the issue on Make’s end.
Good Luck

Edit:

The problem is the syntax in the Communication module:

Incorrect:

"body": {
        "data": "{{parameters.data}}"
    },

Correct:

"body": "{{parameters.data}}",

Thank you for the detailed response.

The Custom App is for Walmart Marketplace API, specifically for this endpoint: Create Shipping Estimate

The Mappable Parameters are defined as:

[
	{
		"name": "data",
		"type": "collection",
		"label": "Request Body",
		"spec": [
			{
				"name": "boxDimensions",
				"type": "collection",
				"label": "Package Data",
				"help": "Box dimensions and weight for a shipping package.",
				"required": true,
				"spec": [
				{
					"name": "boxLength",
					"label": "Length of the package",
					"help": "Required when packageType is CUSTOM_PACKAGE; not required for other standard package types (e.g., FEDEX_ENVELOPE, FEDEX_PAK) where dimensions are predetermined by the carrier.",
					"type": "number",
					"required": false
				},
				{
					"name": "boxWidth",
					"label": "Width of the package",
					"help": "Required when packageType is CUSTOM_PACKAGE; not required for other standard package types (e.g., FEDEX_ENVELOPE, FEDEX_PAK) where dimensions are predetermined by the carrier.",
					"type": "number",
					"required": false
				},
				{
					"name": "boxHeight",
					"label": "Height of the package",
					"help": "Required when packageType is CUSTOM_PACKAGE; not required for other standard package types (e.g., FEDEX_ENVELOPE, FEDEX_PAK) where dimensions are predetermined by the carrier.",
					"type": "number",
					"required": false
				},		
				{
					"name": "boxDimensionUnit",
					"label": "Unit of measurement for the package dimensions",
					"help": "Required when packageType is CUSTOM_PACKAGE; not required for other standard package types (e.g., FEDEX_ENVELOPE, FEDEX_PAK) where dimensions are predetermined by the carrier.",
					"type": "select",
					"options": [
						{
							"label": "Inches",
							"value": "IN"		
						},
						{
							"label": "Feet",
							"value": "FT"		
						},
						{
							"label": "Centimeters",
							"value": "CM"		
						}
					],
					"required": false,
					"default": "IN"
				},
				{
					"name": "boxWeight",
					"label": "Weight of the package",
					"help": "Required for all package types. The Unit is determined by boxWeightUnit.",
					"type": "number",
					"required": true
				},
				{
					"name": "boxWeightUnit",
					"label": "Unit of measurement for the package weight",			
					"type": "select",
					"options": [
						{
							"label": "Pounds",
							"value": "LB"		
						},
						{
							"label": "Kilograms",
							"value": "KG"		
						},
						{
							"label": "Ounces",
							"value": "OZ"		
						}
					],
					"required": true,
					"default": "OZ"
				}
				]
			},
			{
				"name": "deliverByDate",       
				"type": "text",  
				"label": "Estimated Delivery Date",
				"help": "ISO-8601 string",		
				"required": true
			},
			{
				"name": "shipByDate",       
				"type": "text",  
				"label": "Estimated Shipping Date",
				"help": "ISO-8601 string",		
				"required": true
			},	
			{
				"name": "fromAddress",
				"type": "collection",
				"label": "Ship From",
				"help": "Seller's fulfillment center address",
				"required": true,
				"spec": [
					{
						"name": "addressLines",
						"label": "Address Lines",
						"help": "Street address lines for the seller's fulfillment center.",
						"type": "array",
						/*"spec": [
							{	
								"label": "Address line",
								"help": "A single street address line.",
								"type": "text"						
							}
						],*/
						"required": true			
					},
					{
						"name": "city",       
						"type": "text",  
						"label": "City",
						"help": "City of the seller's fulfillment center.",
						"required": true 
					},
					{
						"name": "state",       
						"type": "text",  
						"label": "State",
						"help": "State or province of the seller's fulfillment center. Use the standard two-letter code (example, CA, TX).",
						"required": true
					},
					{
						"name": "postalCode",       
						"type": "text",  
						"label": "ZIP code",
						"help": "ZIP or postal code of the seller's fulfillment center.",
						"required": true
					},
					{
						"name": "countryCode",       
						"type": "text",  
						"label": "Country",
						"help": "Country code of the seller's fulfillment center (example, US).",				
						"required": true
					}
				]
			},
			{
				"name": "toAddress",
				"type": "collection",
				"label": "Ship To",
				"help": "To Address - Customer's delivery address",
				"required": true,
				"spec": [
					{
						"name": "addressLines",
						"label": "Address Lines",
						"help": "Street address lines for the customer's delivery address. Provide up to two lines.",
						"type": "array",
						/*"spec": [
							{	
								"label": "Address line",
								"help": "A single street address line.",
								"type": "text"						
							}
						],*/
						"validate": {
							"minItems": 1,
							"maxItems": 2
						},
						"required": true
					},
					{
						"name": "city",       
						"type": "text",  
						"label": "City",
						"help": "City of the customer's delivery address.",
						"required": true 
					},
					{
						"name": "state",       
						"type": "text",  
						"label": "State",
						"help": "State or province of the customer's delivery address. Use the standard two-letter code (example, CA, TX).",
						"required": true
					},
					{
						"name": "postalCode",       
						"type": "text",  
						"label": "ZIP code",
						"help": "ZIP or postal code of the customer's delivery address.",
						"required": true 
					},
					{
						"name": "countryCode",       
						"type": "text",  
						"label": "Country",
						"help": "Country code of the customer's delivery address (example, US).",				
						"required": true
					}
				]
			},	
			{	
				"name": "packageType",       
				"type": "text",  
				"label": "Package Type",
				"help": "This value maps to 'packageTypeShortName' from All carrier package types API response.",
				"required": true 			
			},	
			{	
				"name": "purchaseOrderId",       
				"type": "text",  
				"label": "Purchase Order ID",
				"help": "An unique identifier associated with the seller's purchase order.",
				"required": true			
			},
			{
				"name": "boxItems",
				"label": "A list of items that the seller will be shipping in this package.",
				"type": "array",
				"required": true,
				"spec": [
					{
						"name": "boxItem",						
						"type": "collection",
						"label": "Box Item",
						"help": "Each item must correspond to a line item in the specified purchaseOrder. The lineId and SKU fields are used to uniquely identify the specific item being shipped.",
						"required": true,
						"spec": [
							{
								"name": "sku",
								"type": "text",
								"label": "SKU",
								"help": "sku of an item",
								"required": true
							},
							{
								"name": "quantity",
								"type": "integer",
								"label": "Quantity",
								"help": "Quantity of Item",
								"required": true
							},
							{
								"name": "lineNumber",
								"type": "text",
								"label": "Line Number",
								"help": "PO Line Number",
								"required": true
							}
						]
					}			
				]
			},	
			{
				"name": "carriers",
				"label": "Carriers List",
				"help": "This value maps to 'shortName' from All carriers API response.If not provided, it will fetch response for all service types.",
				"type": "array",
				"spec": [
					{	
						"label": "Address line",
						"help": "A single carrier",
						"type": "text"						
					}
				],
				"advanced": true,
				"required": false
			},
			{	
				"name": "includeServicesNotMeetingDeliveryPromise",       
				"type": "boolean",  
				"label": "Delivery promise date flag",
				"help": "Pass 'false' if only services meeting promised delivery dates needs to be fetched, else 'true' to fetch all supported delivery dates",
				"advanced": true,
				"required": false 			
			},
			{
				"name": "addOns",
				"type": "boolean",
				"label": "Add-ons Flag",
				"help": "Pass 'true' to fetch all addOns cost and we support two add ons type: SIGNATURE and INSURANCE. To get Insurance Estimate, please provide purchaseOrderId and boxItems details. By default, The value of addOns will be false.",
				"advanced": true,
				"required": false
			},
			{
				"name": "hasBattery",
				"type": "boolean",
				"label": "Has Batteryflag",
				"help": "Pass 'true' if the shipment consists of battery. This is a mandatory field for yanwen.",
				"advanced": true,
				"required": false
			}
		]
	}
]

The Communication block is below. I specified the inclusion of Accept and Content-Type header since missing these will throw an error:

{
    // Request to API endpoint.
    "url": "/v3/shipping/labels/shipping-estimates", // Relative to base URL

    "method": "POST",
   
    // Additional HTTP headers
    "headers": {
        "Accept": "application/json",
        "Content-Type": "application/json"  
    },
    "body": {
        "data": "{{parameters.data}}"
    },
    "response": {
        "output": {
            "statusCode": "{{statusCode}}",
            "body": "{{body}}",
            "headers": "{{headers}}"            
        }       
    }
}

I redirected the POST call to webhook.site and the captured data is:

{
	"log": {
		"version": "1.2",
		"creator": {
			"name": "Webhook.site",
			"version": "1.0"
		},
		"entries": [
			{
				"startedDateTime": "2026-07-06 15:55:08",
				"request": {
					"method": "POST",
					"url": "https://webhook.site/0fdadefd-01e4-4ac3-838a-4a4f3d4d0e4f",
					"headers": [
						{
							"name": "tracestate",
							"value": "dd=t.ksr:0.0585106;t.tid:6a4bcfdc00000000;t.dm:-1;s:0;p:0a7e0d2fd9a6b531"
						},
						{
							"name": "traceparent",
							"value": "00-6a4bcfdc000000000a7e0d2fd9a6b531-0a7e0d2fd9a6b531-00"
						},
						{
							"name": "x-datadog-tags",
							"value": "_dd.p.tid=6a4bcfdc00000000,_dd.p.ksr=0.0585106"
						},
						{
							"name": "x-datadog-sampling-priority",
							"value": "0"
						},
						{
							"name": "x-datadog-parent-id",
							"value": "756056286611027249"
						},
						{
							"name": "x-datadog-trace-id",
							"value": "756056286611027249"
						},
						{
							"name": "content-length",
							"value": "606"
						},
						{
							"name": "host",
							"value": "webhook.site"
						},
						{
							"name": "content-type",
							"value": "application/json"
						},
						{
							"name": "accept",
							"value": "application/json"
						},
						{
							"name": "user-agent",
							"value": "Make/production"
						}
					],
					"bodySize": 606,
					"postData": {
						"mimeType": "application/json",
						"text": "{\"data\":{\"boxItems\":[{\"boxItem\":{\"sku\":\"ABCD\",\"quantity\":1,\"lineNumber\":\"1\"}}],\"toAddress\":{\"city\":\"Anytown\",\"state\":\"XX\",\"postalCode\":\"00000\",\"countryCode\":\"US\",\"addressLines\":[\"123 Any St\"]},\"shipByDate\":\"2026-07-07T17:00:00.000Z\",\"fromAddress\":{\"city\":\"Nowhere\",\"state\":\"ZZ\",\"postalCode\":\"99999\",\"countryCode\":\"US\",\"addressLines\":[\"987 Nowhere Dr\"]},\"packageType\":\"CUSTOM_PACKAGE\",\"boxDimensions\":{\"boxWidth\":5.5,\"boxHeight\":5.5,\"boxLength\":56,\"boxWeight\":200,\"boxWeightUnit\":\"OZ\",\"boxDimensionUnit\":\"IN\"},\"deliverByDate\":\"2026-07-10T17:30:00.000Z\",\"purchaseOrderId\":\"1234567890\"}}"
					}
				},
				"response": {
					"status": 200,
					"httpVersion": "HTTP/1.1",
					"headers": [
						{
							"name": "Content-Type",
							"value": "text/html"
						}
					],
					"content": {
						"size": 156,
						"text": "This URL has no default content configured. <a href=\"https://webhook.site/#!/edit/0fdadefd-01e4-4ac3-838a-4a4f3d4d0e4f\">Change response in Webhook.site</a>.",
						"mimeType": "text/html"
					}
				}
			}
		]
	}
}

I noticed the following required headers are not present:

  • WM_SEC.ACCESS_TOKEN: this should be injected by the Connection module, otherwise no module would work
  • WM_QOS.CORRELATION_ID: ?
  • WM_SVC.NAME: ?

These 3 headers are defined in the Base module, but they don’t show on the webhook. Is this normal behavior?

I’ve sent the same request using the Make Any Call module and it worked as expected.