While testing I am getting Internal Server Error

It only happens sometimes, but is happening on a particular record when it is edited.

When clicked on the link in the console, I get this

{
    "$id": 1,
    "Ref": 4,
    "Status": "A",
    "Type_Ref": 4,
    "Group_Ref": 2,
    "Voucher_Ref": "",
    "Client_Ref": null,
    "First_Name": "Leslie",
    "Last_Name": "Thomas",
    "Mobile": "04 555 111 222",
    "Email": "lthomas@gmailx.com",
    "Date_Booked": "2025-08-26T10:00",
    "Date_Reqd": "2025-09-07T10:00",
    "Trip_Detail": null,
    "Num_Pax": 1,
    "Cost_PP": 450,
    "Total_Cost": null,
    "Pax_Details": null,
    "Total_Weight": null,
    "Address": null,
    "Location": "",
    "Location_Lat": 21.3,
    "Location_Long": 12.4,
    "Destination": "",
    "Destination_Lat": 34.5,
    "Destination_Long": 43.6,
    "Craft_Requested": null,
    "Craft_Assigned": null,
    "Pilot": null,
    "Fuel_Reqd": null,
    "Fuelled_By": null,
    "Accommodation_Reqd": null,
    "Accommodation_Addr": null,
    "Accommodation_Booked": null,
    "Extra_Details@xdata.proxy": "Bookings(4)/Extra_Details",
    "Confirmed": null,
    "Notes_For_Pilot": null,
    "Notes": null,
    "Notes_Popup": null,
    "Schedule_Ref": 0,
    "Created": "2025-08-26T11:26:38",
    "Modified": "2025-09-04T15:43:25",
    "Created_By": 1,
    "Modified_By": 1
}

The json is malformed. Extra_Details, in the DB, is null and the field is not even exposed in the TXdataWebDataSet.

I know its pretty open ended. Any pointers for me to track it down. It almost looks like memory corruption to me. But is it on the client or the server ?

What is wrong with the JSON? It looks like the format is correct.

Since the request is responding with status code 500, first step is to check the request response body, usually there are more information there (e.g., error message). If not clear, second step is to debug the server when such request is being done and have a better idea of what is raising the error.

The reason I said that the Json is malformed is because this line

   "Extra_Details@xdata.proxy": "Bookings(4)/Extra_Details",

should be

   "Extra_Details": null,

Anyway found it. Pax_Details is a json field in MySql corresponding to a table of details for a variable number of passengers. One of the elements inside it (Weight) is numeric and is picked from a combobox. The value had not been selected an was thus null. MySql was hiccuping.

Making it 0 (when null) would have been incorrect as they need to know the total weight of passengers on charter flights. I fixed it by making it a string, so null translates to blank.

1 Like