milimetric / passport-mediawiki-oauth

npm module for the oauth protocol on mediawiki sites
MIT License
5 stars 5 forks source link

Make sure to catch all API errors #7

Open stefandesu opened 5 years ago

stefandesu commented 5 years ago

In this piece of code, only the err variable is checked for errors. There can be errors that do not cause the POST request to return an error though, like described here. Those errors should be caught as well and relayed to the user in some way to make debugging issues easier.