Sha256: e30bf77e56bfdb76a3b0815fddf942b8e0ffc96ded9957655c3679689c3cddf6
Contents?: true
Size: 677 Bytes
Versions: 3
Compression:
Stored size: 677 Bytes
Contents
const checkStatus = response => { if (!response.ok) throw response; return response.json(); }; const catchErrors = response => response.json ? response .json() .then(json => { console.log(json); noty({ text: json.message, type: "error" }); if (json.message === "Invalid Authenticity Token. Reloading.... ") location.reload(); }) .catch(error => { noty({ text: `${response.status} - ${response.statusText}`, type: "error" }); }) : noty({ text: "Unknown Error", type: "error" });
Version data entries
3 entries across 3 versions & 1 rubygems