Errors
not_found_in_mode
404 — the referenced resource exists in the other mode but not in the requested mode.
Last updated
Cause
Matter strictly segregates test and live data. Resources created in test mode are invisible in live mode and vice versa. not_found_in_mode is a deliberately narrower variant of not_found_resource that surfaces when the system can tell the id is well-formed and resolves in the other mode — just not in the mode of the current request.
This signal is useful for diagnostics because it disambiguates "I copy-pasted the wrong id" from "I am pointing at the wrong host". Matter only emits this specific code when the token's account owns a matching id in the other mode and the calling principal has scope to know about it; otherwise the response collapses back to not_found_resource to avoid information leak. The narrower code surfaces only when the id is well-formed and resolves in the opposite mode.
Fix
- Confirm the intended mode. Test ids start with
*_test_or live in test-only schemas; live ids do not have a mode marker. - If the request is meant for test, route through
api.test.mattermode.comor attachMatter-Mode: test. - If the request is meant for live, the id is wrong. Look up the corresponding live id rather than reusing the test id.
- Never copy a test-mode id into live data sources or vice versa. Modes are walled off precisely so test fixtures cannot taint live state.
Related codes
not_found_resource— the generic id-not-found case.auth_token_mode_mismatch— the token's mode disagrees with the host.