'Getting : Uncaught (in promise) SyntaxError: Unexpected token < in JSON at position 0

I have got such error while want to fetch data from database . Uncaught (in promise) SyntaxError: Unexpected token < in JSON at position 0



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source