Experience-Monks / Experience-Monks/preloader

Question: What is the correct way to handle JSON load errors?

Open
#20 0 comments 1 reaction 0 assignees View on GitHub
Dominant language
JavaScript
Stars
69
Forks
17
PR merge metrics
No merged PRs in 30d

Description

Hi! First of all: Thanks for a good library!

In the documentation it's not clear how to handle errors, and there doesn't seem to be a

` loader.on("error", function(err) {}) `

or at least it's not actually triggered when I try to load an invalid .json file. The error I fail to catch is

`Uncaught DOMException: Failed to read the 'responseText' property from 'XMLHttpRequest': The value is only accessible if the object's 'responseType' is '' or 'text' (was 'json').
at initialize._parseContent`

Any suggestions?
Thanks again!

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.