Ghost/core/server/services
Rishabh 196cdafe6b 💡 Removed 401 error for logged-out member on Portal
closes https://github.com/TryGhost/Team/issues/560
closes https://github.com/TryGhost/Ghost/issues/12870

The endpoint `/members/api/member/` is used by Portal for fetching member details on site load to setup different flows. The response from this endpoint for logged out member has now changed from 401 Unauthorized to 204 No Content.

Ghost API was previously returning 401 Unauthorized error for logged-out member as this seemed to be technically correct response for unauthorized access to membership features. This resulted in a lot of confusion for end users where visible 401 errors on console were perceived as errors in the script as well as caught by loggers as erroneous traffic. Also for an end user, in the context of visiting a website - the user themselves is not trying to gain access to anything so this becomes cause for more confusion.

After internal discussion, the endpoint - [SITE_URL]/members/api/member- now returns 204 No Content instead of 401 for logged out member, denoting server was able to process the request but did not find any associated member. This should avoid any unwanted error logging on Portal load on a site, as well as make Portal functioning more transparent for a site.
2021-05-13 15:26:07 +05:30
..
adapter-manager Moved config from server to shared (#11850) 2020-05-27 18:47:53 +01:00
auth Updated setup flow to rename default product 2021-05-10 13:59:00 +05:30
bulk-email Moved i18n to shared 2021-05-04 13:03:38 +01:00
email-analytics Fixed analytics require error 2021-03-02 08:26:42 +00:00
invitations Moved i18n to shared 2021-05-04 13:03:38 +01:00
invites Moved i18n to shared 2021-05-04 13:03:38 +01:00
jobs Added custom worker message handler 2021-02-22 20:02:00 +13:00
mail Fixed i18n being called outside of a function 2021-05-05 16:34:40 +01:00
mega Added periodic "emails" limit check when (re)sending a newsletter 2021-05-07 18:45:14 +04:00
members 💡 Removed 401 error for logged-out member on Portal 2021-05-13 15:26:07 +05:30
notifications Moved i18n to shared 2021-05-04 13:03:38 +01:00
permissions Moved i18n to shared 2021-05-04 13:03:38 +01:00
settings Expanded requires of lib/common i18n and events 2021-05-03 17:14:52 +01:00
themes Moved package-json wrapper outside implementation folder 2021-05-06 12:56:21 +01:00
webhooks Expanded requires of lib/common i18n and events 2021-05-03 17:14:52 +01:00
labs.js Moved i18n to shared 2021-05-04 13:03:38 +01:00
limits.js Added support for max periodic limit check 2021-05-07 18:43:47 +04:00
oembed.js Moved the OEmbed service to use our DI pattern 2021-01-15 15:35:30 +01:00
slack.js Moved i18n to shared 2021-05-04 13:03:38 +01:00
users.js Moved the users service to use our DI pattern 2021-01-15 17:58:36 +01:00
xmlrpc.js Moved i18n to shared 2021-05-04 13:03:38 +01:00