luocooong opened a new pull request #2177:
URL: https://github.com/apache/drill/pull/2177


   # [DRILL-7866](https://issues.apache.org/jira/browse/DRILL-7866): Provide a 
helpful message when failure to decode plugin json
   
   ## Description
   This is not helpful message on Web UI when failure to decode plugin json.
   ```
   "Invalid JSON"
   ```
   The PR provide a  user-friendly notification in some case :
   Case 1 : Missing the `type` keyword
   ```
   Please retry: Invalid JSON: missing type id property 'type' at [Source: 
(String)"{ "driver": "xxx.Driver", "url": "jdbc:xxx:xxx", "enabled": false }"; 
line: 7, column: 1]
   ```
   Case 2: Not supported the plugin name
   ```
   Please retry: Invalid JSON: known type ids = [InfoSchemaConfig, 
MockBreakageStorage$MockBreakageStorageEngineConfig, SystemTablePluginConfig, 
file, mock] at [Source: (String)"{ "type": "ozone", "enabled": false }"; line: 
2, column: 11]
   ```
   Case 3: Unknow the parameters
   ```
   Please retry: Invalid JSON: Unrecognized field "test"
   ```
   
   ## Documentation
   N/A
   
   ## Testing
     1. Manual test on Web UI
   


----------------------------------------------------------------
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:
[email protected]


Reply via email to