LionWeb-io / lionweb-repository

Reference implementation of LionWeb repository
Apache License 2.0
2 stars 1 forks source link

Repository object is not rendered conveniently in log messages #65

Open ftomassetti opened 2 weeks ago

ftomassetti commented 2 weeks ago

In the console output, I saw this string:

query:  SET search_path TO "repository:[object Object]";

We may need to check how the repository object is printed in log messages.

joswarmer commented 2 weeks ago

This seems to be more important than just a console message. The [object Object] should be a string, and it isn't. Most probably because the request to the server is lacking the repository parameter. This is an error that should be caught.

Do you have the request data?

ftomassetti commented 2 weeks ago

Do you have the request data?

No, sorry, I noticed it in the output but I did a ton of requests so I do not know which request caused this, but the problem could be here: https://github.com/LionWeb-io/lionweb-repository/blob/058780d5b29d5857d98bc2658eaea4fc5f9cc777/packages/common/src/database/DbConnection.ts#L19

joswarmer commented 2 weeks ago

Do you have the request data?

No, sorry, I noticed it in the output but I did a ton of requests so I do not know which request caused this, but the problem could be here:

https://github.com/LionWeb-io/lionweb-repository/blob/058780d5b29d5857d98bc2658eaea4fc5f9cc777/packages/common/src/database/DbConnection.ts#L19

This is the console message indeed, but repositoryData.repository is a string, instead of an object according to the code. Need to find out why is an object in some cases.

joswarmer commented 6 days ago

This should be fixed by now, but since I could not reproduce it, lets keep an eye open for this happening again (or not).