appbaseio / appbaseio/reactivesearch

Catch 401 errors without throwing error when auth is not valid anymore

Abierto
#1,590 7 comentarios 5 reacciones 0 asignados Ver en GitHub
feature
Lenguaje dominante
JavaScript
Estrellas
4.9k
Forks
478
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

When a search fails and returns 401 (let's say because the session is not valid anymore), Reactive Search throws an error. I would love to catch it to _not trigger an error_, since it just means the connection is lost. The problem in throwing an error is that it adds some mess the console and the bug trackers (eg: Sentry). For instance, I would love a clean way to catch the error then redirect the user to a auth. `onError` on components is too late since the error is already thrown.

I'm using v3.14.0 (React project)

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.