In endpoint definition, we have values NOT being mapped but in the sample payload. As a result, those unmapped values are passing in from the sample payload. Based on the help text I would assume null would be used, should this sample be sent?
If I understand you correctly, you’ll want to set the Null Handling Mode for that mapping. It sounds like the current mode is Use Sample Payload Value and you want either Use Null or Remove Key and Value.
If nothing is selected for the Null Handling Mode, it should default to Use Null. If that’s not what’s happening … this sounds like a bug.
Hi Ian, this works perfectly. Thanks. I have a related question. I have an API that returns Info plus records, something like
{ “itemBaseOutput”: {
"sizeOutput": {
"moreData": true,
"recordsInSearch": 2066
},
"itemBaseDataList": [
{
"supplierNumber": 9999,
"itemNumber": "string",
"description": "string"
},
{
"supplierNumber": 9999,
"itemNumber": "string",
"description": "string"
}
]
}
}
It works perfectly, but when there are no records returned, I have a lot of “errors” in the endpoint log for all the fields in the detail it cannot map beacuse they are not present in the JSON.
Is there a way to make the mapping optional, similar to the null handling on the input side?
@brandt
There is a backlog idea for this and I will tag this discussion to it. Currently it is not possible to suppress all those Failure to map response to response table rows that end up in endpoint logging for endpoints that have dynamic responses.
Thanks Ian. It is a bit trouble some if you get 3000 records from an API, each missing one or more fields… Then searching and finding real problems are …
@brandt.koos I agree. I’ve sometimes resorted to exporting Endpoint Logging to CSV and using Excel to filter our those junk rows.