Error contract
Every error response from the widget’s API carries acode and a detail:
detail is a plain string, with one exception: when the request itself failed validation, detail is an object keyed by the field that failed instead — one array of messages per field, the same shape you’d get from any field-level validation error.
20000 is the only code that carries this shape today — every other code below always answers with a single string message.
When a session ends
A user’s session can end in several ways. The widget handles all of them the same way: it shows a “session ended” screen and firesripio-session-expired — see Session lifecycle.
A reload doesn’t recover a session: the code in the URL was already used. If your users see the “session ended” screen right after opening the widget, check that you request a fresh code every time you open it and that nothing caches it.