Skip to content

Show errors for artwork offline and extension not installed #50

Closed

Description

@jvolker

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

  1. changed the title [-]Show errors[/-] [+]Show errors for `artwork offline` and `extension not installed`[/+] on Sep 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions