OpenDataNode / UVPlugin-filesToCKAN

GNU Lesser General Public License v3.0
0 stars 0 forks source link

Wrong log level for "File upload too large" error #16

Closed jindrichmynarz closed 9 years ago

jindrichmynarz commented 9 years ago

When you try to use l-filesToCkan to upload a file of size that exceeds the limit given by ckan.max_resource_size in CKAN configuration, the pipeline execution fails with an error. However, the cause of the failure, the "File upload too large" error is reported as warning in the execution log. For example:

Response:{"help": "https://jmynarz.odn.in.eea.sk/internalcatalog/api/3/action/help_show?name=internal_api", "success": false, "error": {"__type": "Validation Error", "upload": ["File upload too large"]}}

Since this is an error that causes the pipeline execution to fail, its log level should be set to error.

Context: Tested with the latest commit on the develop branch (c7aad00c7eb496bb7751ec9176729dfc27eae0cc).