smui
smui copied to clipboard
add better error messaging upon rules collection creation
If you do not provide both names, there should be a clear error message that says as much.
If a 500 Internal Server Error comes back, surface that to the user and hint that it is most likely because they are trying to create a rules collection for a Solr collection that already has one attached to it.
Error handling makes sense, however I wonder if there is also a better response code that the API could provide?
Now instead of a 500, the API catches that issue with SQL constraints not allowing the addition, and returns back a more normal BadRequest.