qgustavor / mega

Unofficial JavaScript SDK for MEGA
https://mega.js.org/
MIT License
161 stars 43 forks source link

Better error handling in API #131

Closed qgustavor closed 1 year ago

qgustavor commented 1 year ago
  1. Check response status before calling .json() and handle them properly.
  2. Emit or ignore errors instead of throwing.

Fixes https://github.com/qgustavor/mega/issues/130.