Using Cypress for end to end testing and getting a 401 error, not to sure why

I created a cypress test using cy.visit('http://localhost:3000') and im getting a 401 error. I used a sample test provided by the docs and that works
No description
2 Replies
martinsos
martinsos9mo ago
Ah! So this is actually ok -> this is just Wasp client asking Wasp server "hey get me user's profile" and server says "no can't do, user is not authenticated". However, Wasp server communicates that with 401. We might be looking to change that in the future. TLDR; This is not an error, it is expected behaviour from Wasp side. You should likely follow advice Cypress there, to follow the uncaught:exception event.
martinsos
martinsos9mo ago
I just opened an issue for this on our side https://github.com/wasp-lang/wasp/issues/1880
GitHub
Find a way to avoid getting 401 from server when user is not logged...
In Wasp, when on a page that requires auth user, client will ask server to get the user via auth/me route, which will then return 401 if user is not authenticated. We just ignore that 401 and go wi...
Want results from more Discord servers?
Add your server