This site counts visits with analytics cookies only if you accept. Read the consent

Skip to content

StudioInspector and Playground

Inspector and Playground

What Studio's views show of a call: a search through its whole answer, why a request got no answer and what usually fixes it, a stream that cannot connect, the variables the Playground starts with and how it checks them before a send, what Cancel does, and variables the input schema refused.

7 min readUpdated both modes

What Studio's inspector and Playground show of a call, beyond its answer — how to find in a body of any size, why a call failed, how a stream stands, and what the Playground starts with and does.

Find in a body

In the inspector, a call's answer and its variables show as a tree or as text. Find searches their keys and values: the tree keeps what matches and what holds it, opened, with the text marked; the raw text marks its lines; Enter and Shift+Enter move from one match to the next. A body of more than 500 rows draws the rows in sight as it scrolls, so the browser's own find sees only those: after a click in it, ⌘F (Ctrl+F off a Mac) moves to Find, which covers every row. A body larger than 16 KB shows in part, each part left out named where it was, and Find searches the whole of it, which the app or the mock keeps: what the parts left out hold shows too, the raw text's lines numbered as in the whole body, and the line under the field says how much it found — or, once the whole is no longer kept, that the search covers the part shown, and why. Each row of the tree copies the path code reaches it by, such as data.cities[41].name, and the headers' filter marks what it finds.

A request that got no answer

A request that got no answer shows why, as the platform said it. Its Error tab puts the code in its badge — a system's, such as ENOTFOUND, ECONNREFUSED or DEPTH_ZERO_SELF_SIGNED_CERT, Bun's ConnectionRefused, or Courier's own TIMEOUT for a request whose timeout ran out — and the text under the message, each said once: no badge repeats the error's kind, and no line what the message already says. The raw error carries both as cause, the Overview lists them as its Cause, and the Response tab — the Playground's too — says there was no answer, with the code and the text, rather than that the server answered with an empty body. The suggested fix follows the code: a host name that did not resolve, a connection that failed, a certificate that was not trusted, an answer that broke as it arrived, an API that sent no headers in time, redirects that never reach an answer; a code it has no advice of its own for gets the general one and is named in it. A certificate signed by an authority of your own, a company's or a VPN's, is trusted once Node.js is given it through NODE_EXTRA_CA_CERTS, or, when this machine already trusts it, through NODE_USE_SYSTEM_CA=1, which Node.js reads from 22.19 and 24.6 on — see Proxies & Certificates. A browser's fetch gives no code and says only that it failed — Failed to fetch in Chrome, Load failed in Safari, NetworkError when attempting to fetch resource. in Firefox — and a request refused by CORS fails the same way, so the fix says what else it can mean. A call made through the proxy shows the cause the server met, as the server's side of the call reports it; the browser is told no more than before. A request your own code failed because a connection of its own got no answer — a middleware's fetch for a token, a lookup in pathOptions — shows the code and the text the system gave it too, however deep under errors of your own the system's error lies, and the fix says it was your code's request that went unanswered, and points at the host that code called, not at the source's baseURL.

A stream that cannot connect

A stream whose connection cannot be made says so, rather than standing open and live: its Messages tab and its Overview say it is reconnecting, why its last connection ended — the platform's code and text, the status a server refused it with, a server that fell silent, or how a socket closed — how many connections in a row failed and when the next one opens, and its handshake reads never opened. The Timeline and the other lists say retrying — and, while its first connection is being opened, show it waiting as a request in flight — and the editor's hints count the streams reconnecting apart from the ones open. A stream that gives up before any connection opened says so, with the code and the fix it usually needs. A refused socket gives way to a request over HTTP to the same path, and the cause is what the platform said of that request: the system's code and text with Node's fetch, only that it failed in a browser. A socket kept to WebSocket — fallback: false — tells no more than the close code 1006 with a browser's WebSocket or Node's own, where a socket of the ws package gives the system's code and text. A stream or a channel the proxy relays tells how its upstream connection stands. One served in process opens no connection and stands open, as does every stream of an app on an older Courier. An ended stream says who closed it — its server, its caller, its lifetime, a server that shut down — and, closed while it was reconnecting, why its last connection ended.

The Playground's first variables

The Playground starts an endpoint with variables its schema takes, read from the schema itself — Zod, Valibot, or any schema with a toJsonSchema() such as ArkType's: a number at zero or at the bound nearest it, a string of its least length, an enum's or a literal's first value, the first option of a union its schema takes, a sample of a known string format — an email, a URL, a UUID, a date and a time, an IP address — and a nested object filled in the same way, three levels down. A field whose schema checks more than Studio reads — a pattern, a refinement, a Date, which JSON does not hold — is left out when it may be, and starts as the nearest value of its kind when it is required. A variable the endpoint's .defaults() fills in starts at its default.

Variables checked before a send

The line under the variables checks them against what the endpoint's schema takes before they are sent, read from the schema as the first variables are: each value's type, the values an enum or a literal allows, a field the schema requires, and the form of a union a value is meant as — the one of its type, or the one a field such as kind names. It says where the first part that does not fit sits and what is wanted there — "orderId" expects string, got number, "items[1].sku" expects string, got number, Missing required field "shipping.method" — and that the variables match once nothing is out of place. A variable the endpoint's .defaults() fills in counts as set, and a value given in its place is checked. A part that converts what it is given or falls back on a value of its own — z.coerce, .catch(), z.preprocess(), Valibot's fallback — takes any value, and so does one of a type JSON has none for, a Date or a bigint. Bounds, formats and refinements are the schema's to check when the call is sent, and a refusal reads as below.

Cancel

Cancel stops a call still in flight: its request is aborted — to the API in Direct mode, to your app's proxy route in Proxy mode, which then stops its own — and the call reads Cancelled, a status of its own rather than a failure, which an answer arriving after it does not replace. The Requests log shows the request as aborted. A call its runtime leaves unanswered for 30 seconds ends with a timeout and is stopped there too.

Variables the schema refused

A call whose variables the input schema refused says so where its answer would be: its Response tab — the Playground's too — says it was not sent and what the schema said of the first field it refused, and its Request tab marks each one. The Playground's status reads variables refused, the line under the variables keeps the refusal until they change, and the toast says the input schema refused the call rather than that a request failed.