BUG: Favoriting user while unlogged throws error in the browser console
Summary
Favoriting user while unlogged throws error in the browser console and makes the user profile picture disappear
Steps to reproduce
- Go to https://karhukaiset.devopskoulutus.net
- Select "Global Feed" and any user
- Click "Follow" button
What is the current bug behavior?
- Doesn't show any information to user except in the browser console
- Browser console shows some error related to authorization
What is the expected correct behavior?
- User should see some error or information about what happens
Relevant logs and/or screenshots
ERROR Error: Unauthorized
c client.js:425
emit index.js:145
onreadystatechange client.js:705
Possible fixes
- https://gitlab.labranet.jamk.fi/te-team3/conduit-source/react-redux-realworld-example-app/-/blob/master/src/components/Profile.js#L39
-
https://gitlab.labranet.jamk.fi/te-team3/conduit-source/node-express-realworld-example-app/-/blob/master/routes/api/profiles.js#L30
- One of these could include some kind of checking if visitor is authenticated