HTTP Status Codes & Errors

Playground API returns standard HTTP status codes and consistent JSON error responses across all REST and custom endpoints.

Supported HTTP Status Codes

StatusMeaningTrigger Scenario
200 OKSuccessGET requests and successful updates (PUT/PATCH).
201 CreatedResource CreatedSuccessful POST create requests. Returns the new item with ID.
204 No ContentResource DeletedSuccessful DELETE requests. Empty body returned.
400 Bad RequestClient ErrorMalformed JSON body or missing required fields.
401 UnauthorizedMissing / Invalid TokenMissing Bearer token on protected /auth/me routes.
404 Not FoundResource MissingRequested ID does not exist or has been deleted.
500 Server ErrorInternal ErrorSimulated with ?_status=500 for testing error boundaries.

Standard JSON Error Response

When an error occurs, the server responds with a consistent JSON schema:

errorResponse.json
1
{
2
"status": 404,
3
"error": "Not Found",
4
"message": "Post with ID 999 does not exist in baseline or session overlay.",
5
"timestamp": "2026-08-18T00:00:00.000Z"
6
}