memgraph / odin

MIT License
580 stars 14 forks source link

Database never gets updated due to HTTP requests being closed by CORS policy. #4

Closed kikisprdx closed 9 months ago

kikisprdx commented 1 year ago

I tried quite some time to get things working (database never gets filled with embeddings), looking into the dev console on obsidian I noticed the following: Access to XMLHttpRequest at 'http://localhost:8000/knowledge_base/notes/add_file' from origin 'app://obsidian.md' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.

The HTTP request keeps getting blocked which messes with the backend trying to process expected files. At least this is my hypothesis.

AlexIchenskiy commented 9 months ago

It's a valid assumption, and I also considered that possibility. However, after diving into the backend logs, I discovered that it occurs due to a bug in the backend code and the way FastAPI reacts to internal server errors. You can read more about it here. If you're interested in contributing and helping out, you can check out this issue: #8. I'm closing this issue as it's already addressed, but feel free to open new ones if you have any other questions or concerns. Any input is appreciated!