You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@drill.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2021/01/03 04:29:00 UTC

[jira] [Commented] (DRILL-7552) Add Helpful Error Message on Storage Plugin Creation/Update

    [ https://issues.apache.org/jira/browse/DRILL-7552?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17257651#comment-17257651 ] 

ASF GitHub Bot commented on DRILL-7552:
---------------------------------------

cgivre commented on a change in pull request #2127:
URL: https://github.com/apache/drill/pull/2127#discussion_r550954457



##########
File path: exec/java-exec/src/main/java/org/apache/drill/exec/store/StoragePluginRegistryImpl.java
##########
@@ -420,9 +420,13 @@ public void validatedPut(String name, StoragePluginConfig config)
       PluginHandle entry = restoreFromEphemeral(name, config);
       try {
         entry.plugin();
+      } catch (UserException e) {
+        // Provide helpful error messages.
+        throw new PluginException(e.getOriginalMessage(), e);
       } catch (Exception e) {
         throw new PluginException(String.format(
-            "Invalid plugin config for '%s'", name), e);
+            "Invalid plugin config for '%s', "
+          + "Please switch to Logs panel from the UI then check the log.", name), e);

Review comment:
       @luocoong
   Does the exception message have anything useful in it?  Could we include `e.getMessage()` in the message which is returned?
   If you don't think that would be helpful, I'm fine with committing as is. 
   




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


> Add Helpful Error Message on Storage Plugin Creation/Update
> -----------------------------------------------------------
>
>                 Key: DRILL-7552
>                 URL: https://issues.apache.org/jira/browse/DRILL-7552
>             Project: Apache Drill
>          Issue Type: Sub-task
>          Components: Storage - Other
>    Affects Versions: 1.17.0
>            Reporter: Charles Givre
>            Assignee: luocong
>            Priority: Major
>              Labels: error_message_improvement
>             Fix For: 1.19.0
>
>         Attachments: image-2020-01-26-16-47-46-398.png
>
>
> If you are attempting to create or update a storage plugin and for whatever reason an error occurs, the only error message that is displayed in the GUI is 
> {code:java}
> Please retry: Error (unable to parse JSON)
> {code}
> This is unhelpful to the user as the user may have entered in valid JSON, but specified an invalid option. The error gives no indication as to what actually went wrong and how to fix.
> See example below:
> !image-2020-01-26-16-47-46-398.png!
> In this example, the cause of the error is the final option isMysql: false, which does not exist as a configuration option for the JDBC plugin.   



--
This message was sent by Atlassian Jira
(v8.3.4#803005)