OpenDataServices / cove

CoVE is an web application to Convert, Validate and Explore data following certain open data standards - including 360Giving, Open Contracting Data Standard, IATI and the Beneficial Ownership Data Standard
http://cove.opendataservices.coop
Other
43 stars 11 forks source link

As a user who has provided a link to a file that returns an HTTP error, I should see a meaningful error #162

Closed caprenter closed 8 years ago

caprenter commented 8 years ago

If a user supplies an 'invalid URL' - I'm thinking 'results in a 404' but I guess there are other cases as well, the CoVE should supply a friendly error report.

I suspect someone else can spec this out better than this!

timgdavies commented 8 years ago

+1 to this.

Bjwebb commented 8 years ago

e.g. https://app.getsentry.com/open-data-services/cove/issues/101484562/ https://app.getsentry.com/open-data-services/cove-dev/issues/117138055/

Bjwebb commented 8 years ago

Actually the error messages for a 404 are really bad, because we're not inspecting the status code at all, so it tries to load the error page as if it were e.g. an xlsx file https://app.getsentry.com/open-data-services/cove-dev/issues/122530172/

Bjwebb commented 8 years ago

Other similar errors: SSL troubles https://app.getsentry.com/open-data-services/cove/issues/99066243/ and failing to connect to the host https://app.getsentry.com/open-data-services/cove/issues/101484562/

Bjwebb commented 8 years ago

This is now on dev. Here are some examples of different errors: http://dev.cove.opendataservices.coop/ocds/?source_url=http://httpstat.us/404 http://dev.cove.opendataservices.coop/ocds/?source_url=http://localhost:1234 http://dev.cove.opendataservices.coop/ocds/?source_url=https://wrong.host.badssl.com/

Note that the first paragraph comes directly from the Python error message, so whilst it's not always as friendly as we might like, it would be quite a lot of work to change for every possible case.

@caprenter are these meaningful and friendly enough?

caprenter commented 8 years ago

Looks good to me. Thanks