ItzCrazyKns / Perplexica

Perplexica is an AI-powered search engine. It is an Open source alternative to Perplexity AI
MIT License
10.67k stars 931 forks source link

🎉 wip: implemented error state for backend socket connection and othe #222

Closed asifrahaman13 closed 6 days ago

asifrahaman13 commented 6 days ago

The spinner on the home page keeps rolling in case there is a fault from the backend.

🚨 Problem:

  1. If the backend is not running
  2. If there is some error in the connection.

misconfiguration

🪜 Steps to reproduce:

  1. Clone the repository.
  2. Run the front end withoug the backend.
  3. Or do not give proper Opne AI API key.
  4. Sometimes the problem persists due to mi configurations in the local storage. In this case if we run even both front end as well as backend even then the issue persists.

✅ Solution:

I have introduced another state hasError which keeps track of whether there is any error in the conection. In case there is erro UI will display error message along with the toast. So backend won't be blocker.

failed message

@ItzCrazyKns

asifrahaman13 commented 6 days ago

@ItzCrazyKns

ItzCrazyKns commented 6 days ago

Thanks!

asifrahaman13 commented 6 days ago

@ItzCrazyKns

Hey can we use bun package manager and update readme accordingly. That's insanely fast and will result in good dx.