Developer portal / Errors
The Chicagoland Lawyer API error reference
Every 4xx and 5xx response from the The Chicagoland Lawyer API is application/problem+json, as defined by RFC 9457. This page lists every code. Each type URI in a response links to its entry here.
The response shape
Branch on code. It is stable across releases. Do not parse detail or title; both can be reworded.
{
"type": "https://thechicagolandlawyer.com/developers/errors/#missing_field",
"title": "Missing required fields",
"status": 400,
"detail": "These fields are required: phone, email.",
"code": "missing_field",
"hint": "POST {\"name\": \"...\", \"phone\": \"...\", \"email\": \"...\"}.",
"documentation": "https://thechicagolandlawyer.com/developers/",
"errors": [
{ "field": "phone", "code": "missing_field", "message": "\"phone\" is required." },
{ "field": "email", "code": "missing_field", "message": "\"email\" is required." }
],
"error": "These fields are required: phone, email."
}
| Field | Always present | Meaning |
|---|---|---|
type | yes | A URI for the error class. It resolves to this page. |
title | yes | A short summary of the error class. |
status | yes | The HTTP status code, repeated in the body. |
code | yes | The stable machine-readable code. Branch on this. |
detail | yes | What went wrong with this request. |
hint | usually | What to change to make the request work. |
errors | on validation failures | One entry per bad field: field, code, message. |
error | yes | A copy of detail. It exists because the site's own forms read it. New code should read detail. |
Codes
| Code | Status | Cause |
|---|---|---|
missing_field | 400 | A required field was absent or empty. |
invalid_email | 400 | The email address is not valid. |
unknown_pack | 400 | The requested document pack does not exist. |
invalid_body | 400 | The JSON body was not an object. |
malformed_body | 400 | The body could not be parsed. |
unknown_endpoint | 404 | No endpoint is published at that path. |
method_not_allowed | 405 | The endpoint exists, but not for that method. |
rate_limited | 429 | Too many requests from one IP address. |
upstream_error | 502 | The mail-sending origin refused the request. |
internal_error | 500 | Something failed inside the API. |
missing_field - 400
A required field was absent, or held only whitespace.
Fix. Read errors. Each entry names one missing field. Send all of them. /api/v1/intake requires name, phone, and email. /api/v1/document-packs requires email.
invalid_email - 400
The value of email is not a valid address.
Fix. Send a deliverable address. The firm replies to it. Do not send a placeholder.
unknown_pack - 400
The pack value is not a published pack.
Fix. Use notices, no-lease, or business-exit. GET /api/v1/document-packs for the current list.
invalid_body - 400
The body parsed as JSON, but it was an array, a string, or null.
Fix. Send a JSON object of field names to values.
malformed_body - 400
The body parsed as neither JSON nor form encoding.
Fix. Set Content-Type: application/json and send valid JSON. Form encoding also works, with Content-Type: application/x-www-form-urlencoded.
unknown_endpoint - 404
No endpoint is published at that path.
Fix. Read known_endpoints in the response. It lists what exists. GET /api/v1/ for the full index.
method_not_allowed - 405
The endpoint exists, but it does not accept that method.
Fix. Read the Allow header on the response. It lists the methods that work. Read endpoints are GET. Write endpoints are POST.
rate_limited - 429
More than 120 requests arrived from one IP address inside 60 seconds.
Fix. Wait the number of seconds in the Retry-After header, then retry. Read the RateLimit header on every response to avoid this. See rate limits.
upstream_error - 502
The API accepted the request, but the mail-sending origin refused it. No email was sent.
Fix. Retry once. If it fails again, call 630-839-9195. The request is not queued.
internal_error - 500
Something failed inside the API.
Fix. Retry once. If it fails again, report it to justin@thechicagolandlawyer.com with the URL, the method, and the time.