Production / Sean McCoy /
The API said 200 OK. The page was blank.
I built a pipeline that turns documents into HubSpot pages without anyone clicking through the editor. The hardest bug in it produced no error at all. Every request succeeded, every value I wrote came back exactly as I sent it, and the page was empty.
What went wrong
A drag-and-drop page in HubSpot is stored as a tree of sections, rows and cells. Each cell has a type. If you set the type of a module cell to widget, the API accepts it. It stores it. Read the page back and there it is. Then the page renders an empty area where your module should be.
The type has to be custom_widget. Nothing in the response tells you so.
That one word was expensive because I had already built three modules before proving that any of them rendered. One wrong value broke all three at once.
Reading a blank page
A blank page still tells you something if you look at the HTML instead of the screenshot. Three cases come up.
- The template's default content is still there. Your layout never applied.
- The container is there and has nothing in it. The section applied and the module inside it failed. Check the cell type.
- The module's markup is there with empty fields. The field names you sent do not match the names the module declares.
The middle case is the useful one. It narrows the search from the whole system to one value.
The opposite trap
A page can also look finished while the API reports it as empty. A freshly created page returns no layout, because nobody has edited it yet, and it renders whatever defaults the template came with. If you only check the API you think there is no content. If you only glance at the page you think there is plenty. Neither check alone is enough to say what state the page is in.
What I do now
Verification happens against the rendered page. After every write, the pipeline fetches the preview, then looks for markup that only the module could have produced, such as its class names, its field values and its image file names. A success code from the API counts as permission to go and look.
Design gets the same treatment. I query computed styles in a real browser, because the defects come from module styles and theme styles interacting. In that build, computed styles caught every design defect and reading the CSS caught none.
The rule applies well beyond HubSpot. An email platform can report a send, an ad platform can report an approval and a form can report a submission. Each of those is a statement about the system's own records. Open the email, look at the ad, submit the form and find the lead. It takes a few minutes, and you are checking the thing your customer will actually see.