2021年1月17日星期日

Error: API request's result could not be converted to a JSON object:

    Error:     Uncaught (in promise) GET request to api/endpoint? failed with error:  API request's result could not be converted to a JSON object:   <html>   ..some stuff here..  </html>  

So, I made a request to 'api/endpoint', and for some reason it says the JSON object could not converted. I then went to this 'api/endpoint' and did console.log(response) (//this is what is sent to frontend). The console.log in the backend was simply { userId: '..', name: '...'}

I am not sure why this is not able to be translated..?

https://stackoverflow.com/questions/65769096/error-api-requests-result-could-not-be-converted-to-a-json-object January 18, 2021 at 01:06PM

没有评论:

发表评论