[
https://issues.apache.org/jira/browse/SLING-7927?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16902340#comment-16902340
]
Eric Norman commented on SLING-7927:
------------------------------------
[~jebailey] In your proposal, may I ask who would make the decision on how to
handle errors? In other words, how it would be pre-determined whether do call
`load(content)` versus a 'loadQuietly(content)`?
Also, I am curious how these new skipped errors would impact the existing
content loading 'retry' logic. Would the quiet content loading errors trigger
an attempt to re-try content loading later or would that bundle content loading
be considered complete with no retries?
Alternatively, perhaps a better solution would be to create a new maven plugin
to parse and validate that your JSON files are well formed? This should catch
malformed content problems earlier at build time so you wouldn't have to try to
debug the troubles later in the runtime? I'm imagining something similar to
how htl files are validated at build time by
[https://sling.apache.org/components/htl-maven-plugin/]
> JSON Content Loading errors out import on malformed json
> --------------------------------------------------------
>
> Key: SLING-7927
> URL: https://issues.apache.org/jira/browse/SLING-7927
> Project: Sling
> Issue Type: Bug
> Reporter: Jason E Bailey
> Assignee: Jason E Bailey
> Priority: Major
> Fix For: JCR ContentLoader 2.3.2
>
>
> Current Behaviour:
> During the importing of json content from a bundle. If one of the files
> contains malformed json the load process is discontinued and exits. This
> stops the loading of any other, correctly formatted, data.
>
> Expected Behaviour:
> If a single file contains malformed content, that specific file should
> discontinue, the error logged and then the process continues to import the
> rest of the provided content.
> As it is right now, it's possible to load the bundle and have the application
> in an unworkable state. preventing the ability to trouble shoot and
> investigate the root cause.
>
--
This message was sent by Atlassian JIRA
(v7.6.14#76016)