Saturday, April 13, 2019

SyntaxError: Unexpected Token in Restlet

{

    "error":

    {

        "code": "SYNTAX_ERROR",

        "message": "SyntaxError: Unexpected token in object literal (null$lib#3)."

    }

}

or

 {

    "error":

    {

        "code": "SYNTAX_ERROR",

        "message": "SyntaxError: Unexpected token: e (null$lib#3)."

    }

}

The following errors seen above can be caused by:

 

1. A json object not being passed

2. A syntax error in the json request body.

e.g {'id":210414}

Notice the first quote is single and the second quote is double.

No comments:

Post a Comment