-1

using Moodle

while adding a question from question bank this error occurred:

Unexpected token < in JSON at position 0

when opening the console this message occured:

 jQuery.Deferred exception: Unexpected token < in JSON at position 0 SyntaxError: Unexpected token < in JSON at position 0
    at parse (<anonymous>)
    at Qb (/lib/javascript.php/1586869077/lib/jquery/jquery-3.2.1.min.js:1:74283)
    at A (/lib/javascript.php/1586869077/lib/jquery/jquery-3.2.1.min.js:1:77810)
    at XMLHttpRequest.<anonymous> (/lib/javascript.php/1586869077/lib/jquery/jquery-3.2.1.min.js:1:80414) undefined
r.Deferred.exceptionHook @ jquery-3.2.1.min.js:1

1 Answers1

-1

All that error means is that there was an failure in getting a successful response from an Ajax request.

Can you show the code that led up to the error? Does the API you're using return any status code or error you can handle?

Nulla
  • 45
  • 8