You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using InstantSearchNext together with Typesense (typesense-instantsearch-adapter). Everything works fine, except when there's no connection to the self hosted Typesense server. In this case, the following things happen:
Server side: A huge nested stack trace is displayed with this content:
Yes, this is problem is more relevant for self hosted search servers, but I would expect this behaviour to appear as well when there's a connection problem with Algolia.
🔍 Steps to reproduce
Install InstantSearchNext
Point the search client to a non-existing URL
Open the page with SSR enabled
I tried to replicate the local setup on codesandbox, but I see a different error there.
This is not a realistic use case as Algolia has a robust SLA, so an edge case happening while there's no network connection is so rare it won't happen in real life. You can likely catch the error in your adapter and work that way
🐛 Current behavior
Next.js version: 15.0.4
I'm using InstantSearchNext together with Typesense (
typesense-instantsearch-adapter
). Everything works fine, except when there's no connection to the self hosted Typesense server. In this case, the following things happen:Yes, this is problem is more relevant for self hosted search servers, but I would expect this behaviour to appear as well when there's a connection problem with Algolia.
🔍 Steps to reproduce
I tried to replicate the local setup on codesandbox, but I see a different error there.
Live reproduction
https://codesandbox.io/p/devbox/nifty-snowflake-fgxqcg?file=%2Fcomponents%2Fsearch.tsx%3A5%2C9-5%2C21
💭 Expected behavior
I would expect to see the Next.js error component being sent to the browser.
Could it be that the error is not bubbled up correctly? Or it's bubbled up, but some code is not reacting to it? I looked into this code a bit and was wondering if the reason is that the promise only resolved on "result":
once('result'
https://github.com/algolia/instantsearch/blob/master/packages/react-instantsearch-nextjs/src/InitializePromise.tsx
I found this previous issue that sounds related to the current problem. The solution at that time was to adjust the error propagation logic: #5233
Thanks for any support on this issue!
Package version
react-instantsearch-nextjs@0.3.20 react-instantsearch@7.13.9 typesense-instantsearch-adapter@2.8.0
Operating system
maxOS 15.2
Browser
Chrome 131
Code of Conduct
The text was updated successfully, but these errors were encountered: