Hello Team,
Currently we're using Flexmonster + React + Typescript + Elastic Search, the data is stored at ES and shown in Flexmonster, recently we encountered a werid issue that the ES thrown "503 Service Unavailable" error, but Flexmonster prompt a Error dialog without any error message(see attached jpg file)
ES Node:/backend/{es index}/_search
error in backend:
{"error":{"root_cause":[],"type":"search_phase_execution_exception","reason":"","phase":"fetch","grouped":true,"failed_shards":[],"caused_by":{"type":"too_many_buckets_exception","reason":"Trying to create too many buckets. Must be less than or equal to: [65536] but was [65537]. This limit can be set by changing the [search.max_buckets] cluster level setting.","max_buckets":65536}},"status":503}
We're wondering if Flexmonster natively support customize the Error window when backend throws such kind of error?
For example, when fetching data via Elastic Search API({index}/_search), it may prompt Unavalible Service error in backend, but Flexmonster itself seems couldn't catch the error message right,in this case,it's an empty error window.
Many thanks.
Or what kind of message returned from backend to flexmonster will be displayed on the Error window?
thanks
Hello,
Thank you for writing to us.
We managed to reproduce a similar behavior on our end. It seems Elasticsearch errors are not fully parsed; therefore, a general "empty" error pop-up is displayed. Our team will look into this issue in more detail and we will provide a fix with ETA 7th of February.
In the meantime, as a workaround, you could customize the default error pop-up in the following way:
Please let us know if this would work for you.
Kind regards,
Vera
Thanks!
We'll try to apply the workaround.
Hi,
The workaround is useful to override the default error pop-up, but can it be hidden since we want to show our own message bar when there's an error during data fetching?
Thanks alot.
Hello,
Thank you for your reply.
Yes, you can hide Flexmonster pop-ups via CSS.
Here is a JSFiddle for demonstration: https://jsfiddle.net/flexmonster/u7w8rbgd/.
In the example, the error pop-ups are hidden via CSS when an error event is triggered, and a custom message is shown instead.
Please let us know if this helps.
Kind regards,
Vera
thanks I've hidden it via CSS control.
Hello,
Here want to update that the error server-side message has been shown successfully after we add config items for spring boot:
server:
error:
include-message: always
include-binding-errors: always
Attached the screenshot error 2.png
However, as mentioned in previous post, we want to display the error message in our own message bar, to achieve this we need to get the server-side error message correctly, is there an approach to get it? Please be informed that the error was occurred during fetching data via a elastic search api(/{backend}/{es index}/_search in this case), the whole process is done within flexmonster.full.js so I can't get the error message
thanks.
Hello,
Thank you for the update.
We are happy to hear that you found a way to pass and display the error message in Flexmonster.
As mentioned before, our team will also check and enhance the error handling process on our end with the ETA 7th of February.
As for a way to retrieve the error message and show it in a custom message bar outside of Flexmonster:
You are right; currently, the whole process is handled within Flexmonster. Our team will need some time to research convenient ways to handle such cases, and we will share the results with the ETA 22nd of February.
In the meantime, feel free to reach out to us if any questions arise.
Kind regards,
Vera
Hello,
Hope all is well!
We are happy to inform you that our team improved how Flexmonster handles errors when connecting to Elasticsearch.
This is available in the 2.9.18 (latest) minor release version of Flexmonster.
You are welcome to update the component.
As mentioned in our previous response, our team will also check for convenient ways to retrieve the error message. We will provide an update on this point with the ETA 22nd of February.
We will keep in touch!
Kind regards,
Vera
Hello,
We are happy to inform you that our team has added a way to handle errors outside Flexmonster.
Now, events olapstructureerror / queryerror / dataerror
receive an additional argument with error details.
This way, you can get the error message to display it in your own message bar. Here is a JSFiddle for illustration: https://jsfiddle.net/flexmonster/pbvz5f7c/.
This is available in the latest (2.9.19) version of Flexmonster.
You are welcome to update the component.
Please let us know if the update works well for you.
We are looking forward to your feedback.
Kind regards,
Vera
Hello,
Hope all is well!
Our team is wondering if you had a chance to check out the recent update.
Did it work to get the error details in the olapstructureerror / queryerror / dataerror
events and show them in your own message bar?
Please let us know if everything worked.
Looking forward to your reply.
Kind regards,
Vera
Hello,
Hope you are having a wonderful week!
We are wondering if the update helped you.
Could you please let us know if it worked to get the error details to display them in your message bar?
We are waiting for your confirmation.
Kind regards,
Vera