Unexpected token < in JSON at position 0 Means You Got HTML

The angle bracket is the first character of an HTML error page. Your API returned a page, not JSON, and here is how to find out which page.

Unexpected token < in JSON at position 0 Means You Got HTML. Abstract javascript illustration in orange and dark grey on debugly.dev
Error First character Usually
Unexpected token < < HTML page
Unexpected end of JSON input nothing Empty body, often a 204
Unexpected token o in JSON at position 1 o You called JSON.parse on an object
Unexpected non-whitespace character after JSON varies Two JSON documents concatenated, or a BOM

Published on debugly.dev by Rohit Bhadani | Founder of Krova Cloud