Closed Rich5 closed 7 months ago
No, this behavior isn't intended. We're aware of the existing discrepancy between the error response format currently specified for the client and the formats Manticore can possibly return. We're going to fix this issue in the next client release which is expected soon.
Thanks! I'd be happy to test the error handling in the next release if that's useful.
Maybe this behavior is intended but I wanted to ask to be sure. Looking at the simple search example below from the README I made the assumption (perhaps incorrectly) that errors returned from Manticore would be handled by the catch block, but that only appears to be the case when there is something like a network error that gets thrown. However, there is no error thrown when Manticore returns an error object like in the case of a syntax error.
Example error response during a syntax error:
If this is intended behavior then it looks like the SearchResponse interface does not account for Manticore errors. As a result I ended up extending the SearchResponse interface, like shown below, in my app.
Then I just handled the error messages specifically in my results handling code. If this in intended then maybe just a small update to the example code would clarify usage better. Another option is to have SearchApi throw errors.