Skip to main content

I have created a post action which takes a structure parameter which looks like below defined in the fragment file.

structure OrderQuotationLineRequest {
   nestedwithcrud = ReadAndWrapWithJson;
   implementation = "utility";
   attribute SalesPartNo Text;
   attribute Quantity Integer;
}

structure OrderQuotationRequest {
   nestedwithcrud = ReadAndWrapWithJson;
   implementation = "utility";
   attribute CustomerId Text;
   attribute WantedDeliveryDate Date;
   attribute ShipAddrNo Text;
   attribute BillAddrNo Text;
   attribute OnlineQuoteNo Text;
   attribute Lines List < Structure(OrderQuotationLineRequest) > ;
}

Projection action declaration looks like below

action CreateSalesQuotation {
   initialcheck none;
   parameter QuotationRequest Structure(OrderQuotationRequest);
}

When trying to call this method I get this error using Postman

{
    "error": {
        "code": "UNEXPECTED",
        "message": "Unexpected internal server error occurred."
    }
}

The payload is like below.

{
    "QuotationRequest": {
        "CustomerId": "xxx",
        "WantedDeliveryDate": "2023-06-01",
        "ShipAddrNo": "xxx",
        "BillAddrNo": "xxx",
        "OnlineQuoteNo": "365455",
        "Lines": >
            {
                "SalesPartNo": "xxxx",
                "Quantity": 1
            }
        ]
    }
}

If I remove the Lines from the payload, it works without any problem. Any idea how I can check the logs and fix this issue?

 

@bhavesh 

Hi Bhavesh,

Can you check the Odata log. As I know it should have print the error call stack.

 

Regards,

Sahan


@bhavesh

Hi Bhavesh,

Can you check the Odata log. As I know it should have print the error call stack.

 

Regards,

Sahan

Any idea where I can find these logs?


Usually logs are in the cloud. You can use a tool like Kibana to fetch the data. If your servers hosted in ifs cloud you can raise a ticket to get the relevant log files . Also mention the timestamp as well. 


Reply