ckan/ckan — pull request #2145 by seanh (2014-12-15 14:41:09+00:00)
Title: Improve datapusher error messages

This is a rewrite of https://github.com/ckan/ckan/pull/2000 based on recent CKAN Service Provider and DataPusher refactoring.

This only works with DataPusher 0.0.2, it's not backwards-compatible with DataPusher 0.0.1 and I don't think we should bother with backwards-compatibility.

The job dicts that DataPusher 0.0.2 sends to CKAN to report the outcome of a job *always* contain an "error" key. The value for this key is either `None` (or an empty dict) if there was no error, or if there was an error then the value is always a dict with a "message" key whose value is a human-readable string. The error dict may also contain other keys specific to the type of error, and DataPusher now uses these extra keys to report specific information about HTTP errors (status code, the URL that errored, etc).

This pr changes CKAN's templates to display all keys from these new error objects:

![screenshot from 2014-12-12 21 02 47](https://cloud.githubusercontent.com/assets/22498/5437380/d547d46e-8467-11e4-8fec-91c5ee481652.png)

![screenshot from 2014-12-12 20 51 19](https://cloud.githubusercontent.com/assets/22498/5437384/e6ed44ec-8467-11e4-9c08-f621da5b3164.png)

This pr also changes the datapusher page to always show the upload log, even when the job has errored

Note that https://github.com/ckan/ckan/pull/2000 also