Markland Hill Get in touch
Devlog

A bare 403 means 'not elevated'

· Bakehouse Collect

When a caller lacks permission, Wix returns 403 with an empty message. No field name, no scope, no hint. It arrives as a wall of empty strings around a status code.

It is not a missing app permission. It is not a wrong field name. It means the call needed elevating and was not.

The trap is specific, and worth stating plainly because it is the shape the bug actually takes. You write a function for the dashboard, where the caller is a Wix user with their own permissions. It works. Later you reuse it on a shopper-facing endpoint, where the caller is a visitor who can read neither the catalogue nor the store’s discount rules through the admin API.

It keeps working in the dashboard. It silently returns nothing on the storefront.

One function did exactly that, and the visible symptom was that every product page showed no offer — which looks precisely like a product with no discount configured. Nothing in the interface, the logs or the response suggested permissions were involved.

The rule that came out of it: anything a shopper triggers runs as that shopper. Reads of the catalogue and of store configuration must be elevated. Reads of the shopper’s own cart must not be — elevating that would ask for the app’s cart, which is nobody’s.

The wider lesson is about reuse. A function that works in one caller context is not a function that works. It is a function that works there, and moving it is a change of behaviour even when the code is character-for-character identical.

← All posts