TryGhost/Ghost · warning · Error
Failed to read comment
Error message
Failed to read comment
What it means
comments.read() GETs /members/api/comments/{commentId} to mark a comment as read by the member (typically for unread-state tracking). It uses credentials: same-origin and throws on a non-ok response. Unlike the write operations, this is a GET with no body.
Source
Thrown at apps/comments-ui/src/utils/api.ts:266
}).then(function (res) {
if (res.ok) {
return res.json();
} else {
throw new Error('Failed to edit comment');
}
});
},
read(commentId: string) {
const url = endpointFor({type: 'members', resource: `comments/${commentId}`});
return makeRequest({
url,
method: 'GET',
credentials: 'same-origin'
}).then(function (res) {
if (res.ok) {
return res.json();
} else {
throw new Error('Failed to read comment');
}
});
},
like({comment}: {comment: {id: string}}) {
const url = endpointFor({type: 'members', resource: `comments/${comment.id}/like`});
return makeRequest({
url,
method: 'POST',
headers: {
'Content-Type': 'application/json'
}
}).then(function (res) {
if (res.ok) {
return 'Success';
} else {
throw new Error('Failed to like comment');
}
});View on GitHub (pinned to 47d8b0e2ad)
Solutions
- Treat read-marking failures as non-blocking — catch and suppress in the UI so the user is unaffected.
- Check the Network tab if read states are consistently wrong.
- If 401, re-establish the session; read state will sync on next authenticated load.
- If 404, remove the comment from local unread state since it no longer exists.
Defensive patterns
Strategy: try-catch
Try / catch
// read-marking is non-critical; swallow errors
try {
await api.comments.read(commentId);
} catch {
// ignore — read state will sync on next authenticated load
} Prevention
- Treat comments.read() failures as non-blocking; never let them crash the UI.
- Catch and suppress to keep the unread-state feature resilient.
- If read states are consistently wrong, check the Network tab for the underlying status.
When it happens
Trigger: The GET returns 4xx/5xx. The commentId does not exist (404), the member session expired (401), the member lacks permission (403), or the server errors (5xx). Since this is often called opportunistically (to clear unread badges), failures may be non-critical.
Common situations: A background read-marking call fires after a comment was deleted. The session cookie expired between page load and the read call. A transient network error returns 502.
Related errors
- Failed to fetch comments
- Failed to add comment
- Failed to edit comment
- Failed to fetch site data
- Failed to fetch replies
AI-assisted analysis of TryGhost/Ghost@47d8b0e2ad (2026-08-13).
Data as JSON: /api/errors/33400e801b43a214.
Report an issue: GitHub.