Description
Currently, the user doesn't get good feedback in two common situations.
1. Artwork not online:
I had a look into downloader.js, and it seems we don't check for the HTTP status code. For example:
Artwork id: 5af67510a38167076035b504
Url: https://scontent-syd2-1.xx.fbcdn.net/v/t31.0-8/20616863_1597372166939729_3032648662710310262_o.png?_nc_cat=0&_nc_eui2=AeHfPJw3QWw9JoLBXOPCTHAZJFrKKpDj8auySrrwmSMTJa-QSqI5WCMYiVzTyOzfzTcwvWmdB1OJliW2mwBNMk_iukcET8r60DNL1vOSgbGrkg&oh=536e01039e345a913ccbd5187bb354b5&oe=5B950E0A
Replies with: 403
There is no error displayed. That makes it really hard to understand what the problem is especially now when the public stream is full of offline artworks.
I was wondering if there is a specific reason why curl is spawned instead of using a native node module like request? It would be easy to check for status codes with request.
2. Extension for artwork format not installed:
If the extension of the requested artwork format is not installed the current error message is:
(node:1737) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): TypeError: Cannot read property 'download' of undefined
This one might be easier to understand but could be improved too.
Activity
[-]Show errors[/-][+]Show errors for `artwork offline` and `extension not installed`[/+]Rewrite of the downloader based on Node request. Clearer error loggin…