Visual Builder

Get Involved. Join the Conversation.


    Ronald Konijnenberg
    Internal server error 500 when creating a complex business...
    Topic posted September 26, 2019 by Ronald KonijnenbergGreen Ribbon: 100+ Points, tagged Action Flows, Business Objects, Database, REST, Security, Web 
    29 Views, 1 Comment
    Internal server error 500 when creating a complex business object using REST call
    Internal server error 500 when creating a complex business object using REST call.

    We would like to store a page variable, whose type is based on the POST request of the REST endpoint of one of our business objects, in our businessobjects. The business object is a complex type referencing another business object, that in its turn references two other business objects. See attached Image.

    We've recreated our approach in an example application which produces similar behaviour:

    1. We defined a request and response type based on a 'complex' business object. In the example app this is the "Driver" object.
    2. We've set appropriate values in pages variable and assigned those to the newDriver variable which is based on the request type. The request variable contains a new driver, new combination of a new trailer and a new truck (we do not want to use existing trailer and truck objects in this scenario).
    3. In an action chain we added a REST call action which performs a POST on the businessobject's REST endpoint. We assign the page variable newDriver to the body of the POST call.


    1. We get an internal server error (500) when we attempt to post the driver_request variable. Error details show numerous exceptions, all showing:

    arguments: [Exception: TypeError: 'caller', 'callee', and 'arguments' properties may not be accessed on strict mode functions or the arguments objects for calls to them at Function.invokeGetter (<anonymous>:2:14)]

    This looks similar to the error discussed in post: this post however does not present a solution.

    1. When we try to store only the 'combination' object within the driver_request variable, by calling the Combination endpoint instead of the Driver endpoint, we do NOT get this error. However, 'trailer'  and 'truck' object are saved successfully and ID's are generated, but these generated ID's are not used as foreign keys in the new 'combination' object and results in an empty Combination object.


    1. How can the internal server error be resolved?

    2. How can we make sure that the foreign keys of the Trailer and Truck are also stored when the Combination is being created?


    See attached file for an example project that contains two buttons to reproduce these two problems.




    • David Konecny

      Driver has reference to Combination and so creating new Driver record should be done with JSON payload like this:

      {"name":"Driver Dave","mycombination":1}

      where an existing Combination record ID is passed. You cannot create new Combination record at same time as creating new Driver. In terms of UI I could image two screens: one where combinations are created using a combo-box for truck selection and another one for trailer selection and perhaps some field to name this combination(?); and second screen where driver is created for a combination which is picked from a combo box and driver's name

      What you are were trying to do in your app would work IF Combination was dependent child object of Driver - in such scenario one REST call can be used to create parent and also all its children. But that is not your case.

      I will raise an issue with Development Team to handle better this situation and return more concrete error message.