ExchangeBC / BCDevExchange-app

The BCDevExchange website is the public facing site for the BC Developers' Exchange - an experiment in tech innovation and collaboration. *NOTE: This repo is deprecated* and retained only for archival/informational purposes. The repo containing the current BC Developers' Exchange app is https://github.com/bcdevexchange/devex. Head over there to see the latest code.
Apache License 2.0
24 stars 12 forks source link

better error handling on /resources #52

Closed GregTurner closed 9 years ago

GregTurner commented 9 years ago

What if a server is down? We should keep partial results

h3devin commented 9 years ago

Break the resources call into separate calls for each source (e.g. resources/github, resources/ckan) and fire off requests for each source and let them populate the complete resources list as they come in.

Add some alerts when calls to resources fail so the user is aware the resources list is incomplete.

GregTurner commented 9 years ago

Think it should be by provider rather than protocol. On 23 Mar 2015 2:32 pm, "Devin Lumley" notifications@github.com wrote:

Break the resources call into separate calls for each source (e.g. resources/github, resources/ckan) and fire off requests for each source and let them populate the complete resources list as they come in.

Add some alerts when calls to resources fail so the user is aware the resources list is incomplete.

— Reply to this email directly or view it on GitHub https://github.com/BCDevExchange/BCDevExchange-app/issues/52#issuecomment-85206535 .

h3devin commented 9 years ago

I've added a first go at this inside the discovery branch. A GET request is fired off for each provider in the config. As they complete they populate the list of resources that appear on the screen. If any of the requests fail, an error pops up indicating that a request failed.

image

The error messages themselves are pretty simplistic. We could expand further by letting the user reattempt a GET request from the error message for example.

The way the list is populated can be a bit jarring as well, perhaps there is a nicer way to have the list populate in the front-end.

h3devin commented 9 years ago

Errors now show the source name instead of a URL.