INC-28product

Every Facebook metrics row carried an error: we asked a reel for a field only a post has

Our Facebook posts are reels, which Graph treats as Video nodes. The metrics collector asked each of them for a `shares` field, but that field belongs to the Page Post object. So every Facebook metric

Verbatim symptom

Tried accessing nonexisting field (shares)

# Every Facebook metrics row said the same thing

Every Facebook row in the metrics table had the same error in it. Not most of them, every one. If a thing fails identically on every single row, it's not flaky, it's wrong in a way that never changes, and that should have told me something sooner than it did.

The repo is claude-social, the fix landed in commit 6903105, and it went in on 2026-11-23. This is the write up of what was going on.

Symptom

The metrics collector runs, goes through each account, and writes a row per post. For Facebook, every one of those rows came back with the same message from the Graph API:

Tried accessing nonexisting field (shares)

That's the string, word for word. It came with the (#100) error code, which is Graph's way of saying you've asked for something that doesn't exist on this object. Shares were never read. Not once. The row got written anyway, so the table looked populated, it just had nothing useful in it for Facebook.

Views, likes and comments were in a similar state, though less obviously. They were all tangled up in the same request, so when the request failed, they went down with it.

What we thought it was

The first diagnosis was permissions. It's always permissions with Graph. The API is full of fields that only come back if the token has the right scope, and the error messages for a missing permission and a missing field can look close enough to each other when you're skimming a log. So the assumption was that the page token was short a scope, someone had reconnected an account with fewer permissions than before, and shares were being refused.

That was believable for a few reasons. Permission refusals really do happen on this API, and we have hit them. The error had (#100) in it, and that code gets thrown for all sorts of things. And the failure was on every account, which fits a scope problem if you think the app itself is missing something rather than one user.

But it didn't hold up. A permission refusal is about who you are. This error was about what you asked for. The message said the field didn't exist, and I'd read past that because the story I already had in my head was a better fit than the words on the screen.

Root cause

Our Facebook posts are reels, and Graph treats a reel as a Video node. The collector was asking each of those nodes for a shares field. That field doesn't live on a Video. It belongs to the Page Post object. So the request was asking one object for something that only exists on a different one.

The bad call is at src/metrics.ts:174@6903105^, which is the line as it stood just before the fix. One request, one field list, one object type assumed for everything.

That's the part that made it hard to see. The field list was a single string, and it mixed things that live in different places. Likes and comments sit on the Video node. Shares sit on the Page Post. Views for a reel come from reel insights, which is a separate edge again. Each of those also has its own permission requirements, so even if the field names had all been valid on one object, a refusal on one of them would have been indistinguishable from a refusal on another.

The old code didn't separate any of it. It sent one query and treated the response as all or nothing. When shares was rejected as nonexistent, the whole thing failed, and the real data that was available on the Video node, the likes and the comments, never made it into the row either.

The fix

The fix splits the read by where the data actually lives.

Likes, comments, post id and permalink now come from the Video node. Shares come from the Page Post. Views come from reel insights. Three reads, each against the object that owns the field, each handled on its own.

The second half matters as much as the first. Each permission refusal is now remembered once per account, and the account gets flagged as needing a reconnect. Before, a refusal just threw the same error on every run, forever. Now it gets recorded the first time, the account is marked, and the collector stops asking for something it already knows it can't have. A human can then see that an account needs reconnecting, which is the actual action required, rather than reading a wall of identical errors.

Why it happened

The code worked in the sense that it ran, wrote rows, and didn't crash. The failure was quiet. A row full of the same error string looks like data to anything that only checks whether a row exists.

It also survived review because the field list looked reasonable. Likes, comments, shares, views, all the things you'd want for a post. Nobody reading it would flag any of those names as wrong, because they aren't wrong. They're wrong for that object, and a diff doesn't show you which object a string is going to be sent to. You have to know the API's shape to see it, and the review was reading the code, not the API.

And we'd modelled a post as one thing. On our side it is one thing. On Facebook's side it's a Video, a Page Post and an insights edge, and the code mirrored our idea of a post rather than theirs.

How to avoid it

If you consume a third party API, find out which object owns each field before you write the field list. Don't assume the thing you call a post is the thing they call a post.

Separate your reads by object, so one bad field can't take down the good ones. Treat a partial result as a partial result.

And record permission refusals as state, not as errors. An error that repeats identically on every run isn't telling you anything new after the first time. Store it once, surface it, and let someone act on it.

Finally, look at your own data. A column that holds the same string in every row is a finding, not a log line.

Every commit, file reference and date above is checked against this incident's Noctem evidence pack before publication. Evidence: facebook-reel-metrics-asked-video-node-for-shares.

Also in the museum

The other 27 failures