You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@manifoldcf.apache.org by "Markus Schuch (Jira)" <ji...@apache.org> on 2022/12/08 06:51:00 UTC

[jira] [Updated] (CONNECTORS-1728) Fix error message of Generic Repository Connector

     [ https://issues.apache.org/jira/browse/CONNECTORS-1728?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Markus Schuch updated CONNECTORS-1728:
--------------------------------------
    Fix Version/s: ManifoldCF 2.24
                       (was: ManifoldCF next)

> Fix error message of Generic Repository Connector
> -------------------------------------------------
>
>                 Key: CONNECTORS-1728
>                 URL: https://issues.apache.org/jira/browse/CONNECTORS-1728
>             Project: ManifoldCF
>          Issue Type: Bug
>            Reporter: Nguyen Huu Nhat
>            Assignee: Karl Wright
>            Priority: Minor
>             Fix For: ManifoldCF 2.24
>
>
> Hi there,
> As there is a problem that is still not addressed during use, I would like to suggest the following correction for the source code of the Generic Repository Connector.
> For additional details, please see below:
> h3. +*1. Connector name*+
> Generic Repository Connector
> h3. +*2. Issue*+
> In the *run()* method of the *GenericConnector$DocumentVersionThread* class, if connector cannot connect to REST API (HTTP status code != 200), there is an error message in log file:
> [ *addSeedDocuments error* - interface returned incorrect return code for: ... ]
> However, this is *DocumentVersionThread* thread, not *ExecuteSeedingThread* thread. The *addSeedDocuments error* prefix is not suiable to this thread.
> I think it should be *getDocumentVersions error* prefix.
> h3. +*3. Cause*+
> This may be a copy/paste mistake:
> [https://github.com/apache/manifoldcf/blob/release-2.22.1/connectors/generic/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/generic/GenericConnector.java#L1207]
> {code:java}
>           if (response.getStatusLine().getStatusCode() != HttpStatus.SC_OK) {
>             exception = new ManifoldCFException("addSeedDocuments error - interface returned incorrect return code for: " + url + " - " + response.getStatusLine().toString());
>             return;
>           }
> {code}
> h3. +*4. Solution*+
> Updating the content of this error message from [addSeedDocuments error] to [getDocumentVersions error]
> h3. +*5. Suggested source code (based on release 2.22.1)*+
> [https://github.com/apache/manifoldcf/blob/release-2.22.1/connectors/generic/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/generic/GenericConnector.java#L1207]
> {code:java}
>           if (response.getStatusLine().getStatusCode() != HttpStatus.SC_OK) {
> -           exception = new ManifoldCFException("addSeedDocuments error - interface returned incorrect return code for: " + url + " - " + response.getStatusLine().toString());
> +           exception = new ManifoldCFException("getDocumentVersions error - interface returned incorrect return code for: " + url + " - " + response.getStatusLine().toString());
>             return;
>           }
> {code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)