openequella / openEQUELLA

Core openEQUELLA sources
https://openequella.github.io/
Apache License 2.0
42 stars 44 forks source link

SchemaSelector has no error handling #2635

Closed edalex-ian closed 1 year ago

edalex-ian commented 3 years ago

Is your feature request related to a problem? Please describe.

On browsing the code I've noticed SchemaSelector still needs some basic error handling added. For example, in the async call to get the list of schemas, there's no .catch. See https://github.com/openequella/openEQUELLA/blob/develop/Source/Plugins/Core/com.equella.core/js/tsrc/settings/SchemaSelector.tsx#L58

Describe the solution you'd like

Ideally FacetDialog should be able to pass it its handleError which is currently unused. SchemaSelector could then call this as required.

Additional context

The fall out of this is pretty minor. Basically the user would see nothing happen, and the browser console.log would have an error message. Also, the likelihood of errors is very low - and more so would be due to network issues which would trigger earlier errors.

edalex-ian commented 1 year ago

Error handling has now been significantly changed (as discussed in #4912), so this issue is now redundant.