- App events (
/api/apps/{id}/events) record platform lifecycle transitions, actions, and errors across the sandbox, deployments, and App deletion. - App logs (
/api/apps/{id}/logs) capture HTTP request logs,console.*output, uncaught exceptions, bundler errors, and runtime transitions from both the development sandbox and production.
Inspect platform state with App events
CallGET /api/apps/{id}/events when a sandbox fails to start, a command or write action is blocked, or a deployment fails:
results is an Event (evt_...):
Filter App events
You can pass comma-separated values tocategory and kind. subject returns events whose subject contains the text:
Inspect code execution with App logs
CallGET /api/apps/{id}/logs to see what your Worker code, the dev server, or the production runtime wrote to the logs:
results is a Log:
Filter App logs
Log sources and notable event names
Common troubleshooting scenarios
1. An HTTP request to the App returns 500
- Find the failing request in the logs:
- Copy the
trace_idfrom the failing log entry. - Fetch every log line from that request in chronological order:
Replace
TRACE_IDwith the 32-character hextrace_id.
2. POST /api/apps/{id}/preview returns 422 preview_failed
The sandbox dev server (celld dev) could not bundle or start your entry module:
- Read
error.detailin the422response body for the compiler output. - You can also list the dev server’s log entries. A failed build has
eventset todev.build_failed:
3. POST /api/apps/{id}/deployments fails
- Read the error in the response. For a deployment that started, inspect
error.codeanderror.messageon theDeploymentobject (GET /api/apps/{id}/deployments/{deployment_id}). - Query the events for that deployment ID to see the exact build or migration output:
- Check the deployment logs:
4. A Secret change is not visible in the App
- In the sandbox: The dev server of a running sandbox gets a changed Secret at once. Commands do not get Secrets, so read the Secret from the App’s code on the dev server.
- In production: Changes to Secrets take effect on the next deployment. Call
POST /api/apps/{id}/deploymentsto publish a new deployment with the updated Secret values.
Next steps
- Learn how deployments and rollbacks work in Publish and unpublish an App.
- Check API status codes and retry rules in Errors.