Consensys / armlet

a MythX API client wrapper
MIT License
17 stars 7 forks source link

Go over how login and refresh errors are reported. #89

Closed rocky closed 5 years ago

rocky commented 5 years ago

My own testing shows this is marginally better.

I am not sure how the code before worked with refresh since it was testing on e.status and strings were being returned or on objects the in the HTTP response field was statusCode, not status.

Feel free to try out and see what you get. This can be a huge time waste though.

There also seems to be a lot of opportunity to DRY code, but alas I didn't have the patience for that either.

coveralls commented 5 years ago

Pull Request Test Coverage Report for Build 396


Changes Missing Coverage Covered Lines Changed/Added Lines %
lib/login.js 4 5 80.0%
lib/requester.js 0 5 0.0%
<!-- Total: 13 19 68.42% -->
Files with Coverage Reduction New Missed Lines %
lib/requester.js 1 60.56%
<!-- Total: 1 -->
Totals Coverage Status
Change from base Build 394: -0.1%
Covered Lines: 249
Relevant Lines: 307

💛 - Coveralls