Legacy Dev Forum Posts

 View Only

Sign Up

  • 1.  Data Action Error

    Posted 06-05-2025 19:21

    apifycloud | 2021-05-12 09:35:28 UTC | #1

    When creating a web service data action, i received this error:

    JSON failed schema validation for the following reasons: Schema: # @/properties/status. Error location: /status. instance type (boolean) does not match any allowed primitive type (allowed: [\"string\"])

    Does anyone can help em to solve this?

    Regards


    Jason_Mathison | 2021-05-12 12:54:21 UTC | #2

    Hi Andres,

    Please post the configuration you are trying to use with anything sensitive redacted.

    --Jason


    apifycloud | 2021-05-12 14:02:38 UTC | #3

    Hi Jason

    This is the action im testing:

    Input Contract { "$schema": "http://json-schema.org/draft-04/schema#", "title": "WhatsApp Out Quick Message", "description": "Request to send Whatsapp template", "type": "object", "required": [ "apiKey", "template", "phone" ], "properties": { "apiKey": { "description": "apikey", "default": "xxxxxxxxxxxxxxxx", "type": "string" }, "template": { "description": "Template name", "type": "string" }, "phone": { "type": "string" } }, "additionalProperties": true }

    Output Contract { "$schema": "http://json-schema.org/draft-04/schema#", "title": "CampaignManagerResponse", "description": "Should return a true or false and a message", "type": "object", "properties": { "status": { "type": "string" }, "msg": { "type": "string" } }, "additionalProperties": true }


    Jason_Mathison | 2021-05-12 14:17:59 UTC | #4

    I updated a test action to use your input and output contracts without any problem. Next up is posting your action configuration (redacted as needed).

    --Jason


    apifycloud | 2021-05-12 19:04:07 UTC | #5

    This action is used to request a external system to send a whatsapp business template from agent script action.

    This request point to the external system url and use two headers as required:

    content-type=application/json accept=application/json

    basically we send here a valid created template using: template and phone fields.

    Let me know if i can share here url from external application and do some test, the issue is that we are receiving this warning after using this:

    Even though the action is executed without any issue. if i do a test in my environment it shows this error:

    JSON failed schema validation for the following reasons: Schema: # @/properties/status. Error location: /status. instance type (boolean) does not match any allowed primitive type (allowed: ["string"])


    Jason_Mathison | 2021-05-12 19:27:46 UTC | #6

    Hi Andres,

    So I think that what that error is saying is that you have your output contract configured to have a "status" of type string, however the actual output of your data action has a "Status" of type bool.

    Depending on your situation you either need to change your output contract to expect that to be a bool, or modify your success template to put double quotes around that value.

    If that isn't enough to help you fix this I would recommend opening up a case with customer care as they can work with you interactively as well as looking at logs.

    --Jason


    apifycloud | 2021-05-12 20:31:54 UTC | #7

    Hi Jason

    This worked ok!

    The problem was related to this "So I think that what that error is saying is that you have your output contract configured to have a "status" of type string, however the actual output of your data action has a "Status" of type bool."

    Just changed it and it was processed ok.


    system | 2021-06-12 20:31:59 UTC | #8

    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: 10891