Skip to content

Fixing some issues related to the database access, logging/debugging messages and more

Santiago Faci requested to merge T361955-fix-databases-issues into main

Fixing some issues related to the database access, logging/debugging messages and more:

  • The error while retrieving instruments for /instruments was wrongly concatenated and it didn't appear
  • From now on all requests are included as logging messages
  • All backend endpoints are responding successfully or in the case of any error (400, 404, 500, . . .). So far we missed some cases and the frontend was waiting forever for a response. It's something we can improve later but, at least, everybody is responding something for every case
  • The baseURL for the unified way is /. That way we don't need to make any change in the code and we can also work on the frontend as a separate service locally using env.local properly
  • Added Cache-control:private when requesting /instruments to avoid being cached (for now at List.vue) to fix the issue we have with the cache
  • Added a new integration test case to test an error response

Please, keep in mind that I have added window.location.href = '/'; after launching/editing an instrument just to test that the then part of the axios call is running properly and we can redirect the user to the catalog after those actions. I guess we should use a Vue router or something similar but, maybe for now, we can use this simpler way. If you don't like it, we can remove it from this MR, of course. It's just a test to prove that our POST call is working fine.

I have also removed the async and await keywords in these cases because I think we don't need them. Same for this, we can reconsider it. Maybe I'm wrong.

I'm pretty sure there are more related improvements but I didn't want to create another big and eternal MR. I think we need some quick/useful improvements to be able to deploy to staging a new version where users can list/register/update instruments. After that, we can keep working.

Edited by Santiago Faci

Merge request reports