0

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?

adam78
  • 9,668
  • 24
  • 96
  • 207

0 Answers0