We're updating the issue view to help you get more done. 

Json options validity should be checked and lead to warnings in logs

Description

When using complex refinery parameters, which give rise to quite big json structures, it's really easy to make a mistake in JSON: forgot a comma, etc.
A JSON invalidity seems to make the entire refinery totally ignored, without any warning.
For me, this should be an error, and should prevent import from being executed.

Environment

None

Activity

Show:
bruno
December 27, 2016, 10:20 AM

Okay, I got the trick: there's a warning about that that can be shown while creating the import mapping by command line:

Lila ~/dev/ee/collectiveaccess/providence/support/bin (master) $ rm -f log*; ./caUtils load-import-mapping -d DEBUG -l . -f ../../../import/mapping_debug.xls
CollectiveAccess 1.6.3 (126/GIT) Utilities
(c) 2013-2016 Whirl-i-Gig
Created mapping mapping_debug from ../../../import/mapping_debug.xls

Lila ~/dev/ee/collectiveaccess/providence/support/bin (master) $ cat log*
2016-12-27 16:22:24 - WARN --> [loadImporterFromFile:../../../import/mapping_debug.xls] Invalid refinery options for group _group_2_2/source 2 = {
{"entityType": "ind"},
{"relationshipType": "creation_auteur"},
}

But this error isn't reported while using graphic interface for import mapping creation (what I used until now).

Is it the case for all the warinings ? None are reported in GUI ?

bruno
December 27, 2016, 11:04 AM
Fixed

Assignee

User known

Reporter

bruno

Labels

None

Components

Fix versions

Affects versions

Priority

Minor
Configure