Legacy Dev Forum Posts

 View Only

Sign Up

Help with translationMap error

  • 1.  Help with translationMap error

    Posted 06-05-2025 18:44

    Robin043 | 2023-06-23 14:28:39 UTC | #1

    Hello,

    I'm trying to get some data out of Topdesk with an API call. The data that i'm trying to get is if a person has an attention and then the attention name value. The action works if a person does have a attention name value but fails if empty:

    {
      "message": "Failed while processing the translation map. Could not resolve value for the key: 'attentionName' and no default value was configured. Additional details: Expected to find an object with property ['name'] in path $[0]['attention'] but found 'null'. This is not a json object according to the JsonProvider: 'com.jayway.jsonpath.spi.json.JsonSmartJsonProvider'.",
      "code": "bad.request",
      "status": 400,
      "messageParams": {},
      "contextId": "e3d6772c-d2e3-45e3-aff6-75901b083194",
      "details": [
        {
          "errorCode": "ACTION.PROCESSING"
        }
      ],
      "errors": []
    }

    There are two scenarios that can happen: The person has attention and the api responds:

    "hasAttention": true,
        "attention": {
          "id": "911f9c21-b7a3-4a14-b3d9-2d8e0b9498ce",
          "name": "A-klant"

    Or the person has no attention and the api responds:

    "hasAttention": false,

    The error happens when the persons attention name value is empty in Topdesk. The API doesn't respond with "name": when it's empty in Topdesk How can I fix that the data action doesn't fail if the value is empty? I've already tried to give the attentionName string a default value in the output contracts, but that doesn't work.


    Jason_Mathison | 2023-06-23 14:57:19 UTC | #2

    Seems like you need to configure your "translationMapDefaults" to fix this.

    --Jason


    Robin043 | 2023-06-23 15:45:04 UTC | #3

    Hello Jason,

    Thank you!

    Adding the code below to the response JSON worked.

     "translationMapDefaults": {
        "attentionName": "\"\""
      },

    system | 2023-07-24 15:45:50 UTC | #4

    This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.


    This post was migrated from the old Developer Forum.

    ref: 20646