mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-01 13:54:35 +03:00
196cdafe6b
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. |
||
---|---|---|
.. | ||
emails | ||
importer | ||
stats | ||
api.js | ||
config.js | ||
content-gating.js | ||
index.js | ||
middleware.js | ||
settings.js | ||
SingleUseTokenProvider.js | ||
stripe-connect.js | ||
utils.js |