In both the search and add-document API calls in the new content add components, ensure that the flow just terminates if the API on the back end doesn't return an expected 20x.
In the earlier Axios code, errors just went to the console; we should probably add some simple user notification this go-around.
fetch() doesn't throw when it encounters HTTP != 2XX.
With the code above, if your API returns something like:
In both the search and add-document API calls in the new content add components, ensure that the flow just terminates if the API on the back end doesn't return an expected 20x.
In the earlier Axios code, errors just went to the console; we should probably add some simple user notification this go-around.
_Originally posted by @matteocargnelutti in https://github.com/harvard-lil/h2o/pull/1980#discussion_r1162077787_