I have the following code:
var data = JSON.parse(error.response.data)
But it is throwing the following error:
SyntaxError: Unexpected token o in JSON at position 1
This is what inside error.response.data:
{
"message": "The request is invalid.",
"modelState": {
"dto.IsInternal": [
"Error converting value {null} to type 'System.Boolean'. Path 'IsInternal', line 1, position 86."
]
}
}
How do i fix?