+ Start a Discussion
Tyler ZikaTyler Zika 

Getting unknown error from lightning framework

An internal server error has occurred Error ID: 1205720554-53597 (408822391)

I used to be able to create new items, but I can't anymore. Here is my code.
 
// get item created from form
var whiteboardItem = component.get("v.newWhiteboardItem");

// get server function to create new item   
var action = component.get("c.newWhiteboardItemDB");


    component.set("v.newWhiteboardItem.TouchpointDev__PersonalItem__c", component.get("v.personal"));

    // send item from form to server
    action.setParams({ "whiteboardItem" : whiteboardItem });
    action.setCallback(this, function(response) {
        var state = response.getState();
        if (component.isValid() && state === "SUCCESS") {
            console.log("Whiteboard item successfully saved");

            // get application event and send it to do list
            var newWhiteboardItemEvent = $A.get("e.TouchpointDev:AddToWhiteboardItemList");                
            newWhiteboardItemEvent.setParams({"whiteboardItem" : response.getReturnValue(), "personal" : component.get('v.personal'), "completed" : component.get('v.completed')}).fire();
        } else if (state === "ERROR") {
            var errors = response.getError();
            if (errors) {
                if (errors[0] && errors[0].message) {

                    // THIS is the line that prints the error.

                    console.log("Error message: " + errors[0].message);
                }
            } else {
                console.log("Unknown error");
            }
        } else {
            console.log("Action state returned was:" + state);
        }
    });
    $A.enqueueAction(action);

    // reset the form

    component.set("v.newWhiteboardItem",{ 'sobjectType': 'TouchpointDev__Whiteboard_Item__c',
                'Name': '',
                'TouchpointDev__Item_Due_Date__c': '',
                'TouchpointDev__AssignedTo__r.Name': '',
                'TouchpointDev__High_Priority__c': 'false',
                'TouchpointDev__PersonalItem__c' : 'true',
                'TouchpointDev__Completed__c' : 'false',
                'TouchpointDev__CompletedBy__r.Name' : '' 
              });
    }
},