You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@solr.apache.org by GitBox <gi...@apache.org> on 2021/06/03 15:36:15 UTC

[GitHub] [solr] thelabdude commented on pull request #42: SOLR-15277: Schema designer UI and supporting backend

thelabdude commented on pull request #42:
URL: https://github.com/apache/solr/pull/42#issuecomment-853963136


   > Schema Designer should not simply throw generic errors that do no help the user. For instance, when a user tries to create a field that already exists, there is just an error processing banner. Ideally, you could grab the important detail in the response body and show it to the user. Consider `data["error"]["details"][0]["errorMessages"][0]` as seen below to populate the banner with something helpful to the user:
   > 
   > ```
   > Possibly unhandled rejection: {"data":{"responseHeader":{"status":400,"QTime":1},"error":{"metadata":["error-class","org.apache.solr.api.ApiBag$ExceptionWithErrObject","root-error-class","org.apache.solr.api.ApiBag$ExceptionWithErrObject"],"details":[{"add-field":{"stored":"true","indexed":"true","uninvertible":"true","name":"name","type":"string"},"errorMessages":["Field 'name' already exists.\n"]}],"msg":"error processing commands","code":400}},"status":400,"config":{"method":"POST","transformRequest":[null],"transformResponse":[null],"jsonpCallbackParam":"callback","data":{"add-field":{"stored":"true","indexed":"true","uninvertible":"true","name":"name","type":"string"}},"url":"techproducts/schema","params":{"wt":"json","_":1622686070279},"headers":{"Accept":"application/json, text/plain, */*","X-Requested-With":"XMLHttpRequest","Content-Type":"application/json;charset=utf-8"},"timeout":10000},"statusText":"Bad Request","xhrStatus":"complete","resource":{"add-field":"..."}}``
 `
   > ```
   
   Can you please provide reproduction steps for how you got this error (including browser details)
   <img width="357" alt="Screen Shot 2021-06-03 at 9 32 19 AM" src="https://user-images.githubusercontent.com/417074/120671957-1c3aad00-c44f-11eb-8c62-ff6051ba9316.png">
   ? Schema Designer UI should be displaying user friendly errors in a dialog. Moreover, I don't even know how you got this error since the JS code validates the field doesn't already exist before submitting the request. See screenshot of what I see in my env.


-- 
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



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org