Error Codes
Every error response from the Chronary API follows a consistent shape, making it straightforward to handle errors programmatically.
Error response format
Section titled “Error response format”All errors return a JSON body with a single error object:
{ "error": { "type": "validation_error", "message": "Invalid request body", "param": "start_time", "request_id": "req_abc123" }}| Field | Type | Description |
|---|---|---|
type | string | Machine-readable error type (see table below) |
message | string | Human-readable explanation of what went wrong |
param | string | null | The specific parameter that caused the error, when applicable |
code | string | Present on some errors: the specific reason within the type, such as event_conflict on a 409 conflict |
conflicting_event_ids | string[] | Present on the double-booking 409s: the events in the way |
request_id | string | Unique identifier for the request, useful for debugging |
Error types
Section titled “Error types”validation_error — 400 Bad Request
Section titled “validation_error — 400 Bad Request”The request body, query parameters, or path parameters failed validation.
Common causes:
- A body sent as
Content-Type: application/jsonthat is empty or not valid JSON (message: “Request body is not valid JSON.”, noparam) - Missing required fields
- Invalid date format in
start_timeorend_time - Value out of allowed range (e.g., negative duration)
- An invalid
recurrence_rule(unsupported RRULE key,COUNTandUNTILtogether,start_timenot matching the rule pattern), orexpand=truewithout both time bounds - An
occurrence_startthat is not an active occurrence of the recurring series - An unknown
timezoneon an event, or atimezone,recurrence_ruleandstart_timethat don’t match once merged (for exampletimezonesent without re-expressingBYDAYin local terms, or astart_timeat the second instance of a repeated local time)
How to fix: Check the param field in the error response to identify which field is invalid. Refer to the API reference for the expected format.
disposable_email — 400 Bad Request
Section titled “disposable_email — 400 Bad Request”Sign-up (POST /v1/agent/sign-up or a console account) was refused because the email address belongs to a disposable (throwaway) email service. param is "email".
{ "error": { "type": "disposable_email", "message": "Disposable email addresses can't be used to sign up. Use a permanent email address.", "param": "email", "request_id": "req_abc123" }}How to fix: Don’t retry with the same address. Sign up with a permanent email address that the account owner reads: the verification code and account notices go there.
email_domain_unreachable — 400 Bad Request
Section titled “email_domain_unreachable — 400 Bad Request”Sign-up (POST /v1/agent/sign-up or a console account) was refused because the email address’s domain can’t receive email, so the verification code could never arrive. Often the domain is misspelled or doesn’t exist. No email is sent. param is "email".
A first sign-in with Microsoft refused for this reason does not return this JSON: the browser goes back to the sign-in page with ?error=signup_blocked.
{ "error": { "type": "email_domain_unreachable", "message": "This email domain can't receive email. Check the address or use a different one.", "param": "email", "request_id": "req_abc123" }}How to fix: Check the address for a typo in the part after @. If it’s correct, sign up with an address at a domain that receives email: the verification code and account notices go there.
signup_blocked — 400 Bad Request
Section titled “signup_blocked — 400 Bad Request”Sign-up (POST /v1/agent/sign-up, a console account, or a first sign-in with Google, GitHub or Microsoft) was refused because Chronary does not accept sign-ups from this email address. No email is sent. param is "email".
A first sign-in with Google, GitHub or Microsoft that is refused does not return this JSON: the browser goes back to the sign-in page with ?error=signup_blocked. For those sign-ins it also covers a disposable email address, too many new accounts from the same network in a short time and, for Microsoft, an email domain that can’t receive email, so signing up later, or with a different, permanent address, can work.
{ "error": { "type": "signup_blocked", "message": "Sign-up is not available for this address. Contact support@chronary.ai.", "param": "email", "request_id": "req_abc123" }}How to fix: For the JSON response, don’t retry, and don’t retry with another address on the same domain. After a refused sign-in with Google, GitHub or Microsoft, use a permanent email address or try again later. If you think this is a mistake, contact support@chronary.ai with the request_id.
challenge_failed — 400 Bad Request
Section titled “challenge_failed — 400 Bad Request”A console sign-up or a waitlist join (POST /v1/waitlist) was refused because the human check on the form was missing or did not pass. It applies only to those two human forms, and only while the check is switched on; agent sign-up (POST /v1/agent/sign-up) never asks for it. param is "turnstile_token".
{ "error": { "type": "challenge_failed", "message": "We could not confirm this request came from a person. Complete the check on the form and try again.", "param": "turnstile_token", "request_id": "req_abc123" }}How to fix: Use the form in the console and let the check finish before you submit. An agent should sign up with POST /v1/agent/sign-up instead.
authentication_error — 401 Unauthorized
Section titled “authentication_error — 401 Unauthorized”The API key is missing, malformed, or revoked.
Common causes:
- Missing
Authorizationheader entirely - Using
Authorization: chr_sk_...instead ofAuthorization: Bearer chr_sk_... - Using a revoked or rotated API key
- Sending a value that is not a Chronary key (keys start with
chr_sk_orchr_ak_), for example a placeholder or a truncated copy
How to fix: Verify the Authorization: Bearer <your_api_key> header is present and uses a valid, active key from the console. Retrying with the same key returns the same 401, so stop and replace the key instead of retrying in a loop.
401 or 429 for a bad key? A bad key normally gets 401 authentication_error. If one network keeps sending invalid keys, requests from it can get 429 rate_limit_error with Retry-After: 60 instead, for about a minute. Requests with a valid key that the API has recently accepted keep working during that time.
key_expired — 401 Unauthorized
Section titled “key_expired — 401 Unauthorized”The API key was created with an expiry (expires_in) and its expires_at has passed. The message gives the expiry time.
How to fix: Roll the Organization key in the console, or create a new key, then update the places that use the old one. An expiry can’t be extended. See Key expiry.
The key of a claimable organization (created with POST /v1/agent/sign-up/anonymous) also answers key_expired once the organization’s expires_at has passed without anyone claiming it. Its data is then deleted; sign up again to start over.
forbidden — 403 Forbidden
Section titled “forbidden — 403 Forbidden”The authenticated key does not have permission to perform the requested action.
Common causes:
- Attempting to modify an event with
source: "external_ical"(external events are read-only) - Using an Agent key on a resource that belongs to another agent, or on an endpoint that only Organization keys can call
- Responding to a scheduling proposal (
spr_) as an agent that is not a listed participant - Calling a feature your current plan doesn’t include — returned as
type: "plan_required", notforbidden(seeplan_required) - Creating an unbounded (or over-window) recurring rule on the Free plan — returned as
type: "plan_required"withfeature: "unbounded_recurrence"and anupgrade_url(Free rules must be bounded and end within 90 days of the series start)
How to fix: Check that the key you are using can reach the resource (an Agent key only reaches its own agent’s resources) and that the source field allows modification. External events synced via iCal subscriptions cannot be edited through the API. For proposals, confirm the responding agent’s id is in the proposal’s participant_agent_ids list.
plan_required — 403 Forbidden
Section titled “plan_required — 403 Forbidden”The feature you called isn’t included in your current plan.
{ "error": { "type": "plan_required", "required_plan": "developer", "feature": "scoped_keys", "message": "Agent-scoped API keys require a Developer or Pro plan", "upgrade_url": "https://console.chronary.ai/settings/billing", "docs_url": "https://docs.chronary.ai/resources/billing/", "request_id": "req_abc123" }}required_plan is the cheapest plan that unlocks the feature and can be bought right now. Every gated feature opens at Developer: Agent keys, cross-agent availability, scheduling proposals, temporal holds, webhook replay and secret rotation. So these errors say "required_plan": "developer", and the message names “a Developer or Pro plan”.
How to fix: Don’t retry. See What to do when you hit a plan limit.
org_suspended — 403 Forbidden
Section titled “org_suspended — 403 Forbidden”Your organization is suspended. Every API key (Organization and Agent keys), MCP request and iCal feed of the organization is refused until it is restored. Your keys are not revoked: they work again, unchanged, once access is restored. The organization’s owner can still sign in to the console.
{ "error": { "type": "org_suspended", "message": "This organization is suspended. Contact support@chronary.ai to restore access.", "request_id": "req_abc123" }}The body can also carry a reason (a short code, such as free_tier_abuse) and a policy_url linking to the policy clause the suspension cites. Both are optional and are left out when the reason can’t be disclosed. The same state is sent in the Chronary-Enforcement response header, for example Chronary-Enforcement: suspended; reason=free_tier_abuse.
{ "error": { "type": "org_suspended", "message": "This organization is suspended. Contact support@chronary.ai to restore access.", "reason": "free_tier_abuse", "policy_url": "https://chronary.ai/acceptable-use#aup-4-2", "request_id": "req_abc123" }}Once our updated Terms of Service and Acceptable Use Policy apply, the message instead names the Terms section and policy clause the suspension is under, and how to appeal, and the console shows the state on every page.
How to fix: Don’t retry. To appeal, write to abuse@chronary.ai. For anything else, contact support@chronary.ai. See Enforcement & Appeals.
org_restricted — 403 Forbidden
Section titled “org_restricted — 403 Forbidden”Your organization is restricted to read-only access. Reads keep working: you can list and fetch your data, call read-only MCP tools, and export your data from the console. Writes are refused: every POST, PATCH, PUT and DELETE on the API and every MCP tool that changes data answers this error. Accepting updated terms (POST /v1/terms/accept) still works. While the organization is restricted, webhook deliveries wait without being sent (nothing is dropped; they go out once access is restored), its booking pages are unavailable and its connected calendars are not refreshed. Your keys are not revoked.
Like org_suspended, the body can carry an optional reason and policy_url, and the response has a Chronary-Enforcement header, for example Chronary-Enforcement: restricted; reason=limit_circumvention.
{ "error": { "type": "org_restricted", "message": "This organization is restricted to read-only access: reads and exports work, writes are refused. Contact support@chronary.ai.", "reason": "limit_circumvention", "policy_url": "https://chronary.ai/acceptable-use#aup-3-2", "request_id": "req_abc123" }}As with org_suspended, once our updated Terms of Service and Acceptable Use Policy apply, the message names the Terms section and policy clause and how to appeal, and the console shows the state on every page.
How to fix: Don’t retry the write. To appeal, write to abuse@chronary.ai. For anything else, contact support@chronary.ai. Enforcement & Appeals lists what still works, every reason code and how to appeal.
anonymous_org_restricted — 403 Forbidden
Section titled “anonymous_org_restricted — 403 Forbidden”A claimable organization (created with POST /v1/agent/sign-up/anonymous, no email) tried something only an owned account can do: create a webhook endpoint, set an email, or call POST /v1/agent/verify. In the console, a claimable organization also cannot claim another one.
How to fix: Don’t retry. Give the claim_url from the sign-up response to the person who should own the calendar; once they open it while signed in to the console, everything moves into their account, where these actions work.
not_found — 404 Not Found
Section titled “not_found — 404 Not Found”The requested resource does not exist or is not accessible from your organization.
Common causes:
- Typo in the resource ID (e.g.,
agt_vscal_prefix mismatch) - The resource was deleted
- The resource belongs to a different organization
- The parent calendar for an event operation does not exist (“Calendar not found”)
- The organizer or a listed participant on a proposal does not exist (“Organizer agent not found” / “One or more participant agents not found”)
How to fix: Verify the ID is correct and uses the right prefix (agt_ for agents, cal_ for calendars, evt_ for events, spr_ for scheduling proposals). Confirm the resource belongs to the same organization as your API key. For proposals, verify the organizer_agent_id and every participant_agent_ids entry reference existing agents.
claim_not_found — 404 Not Found
Section titled “claim_not_found — 404 Not Found”A claim link for a claimable organization did not work: the token is unknown, the link was already used, or the organization expired. All three get the same answer.
How to fix: Ask the agent for a new claimable organization and its claim link. Each link works once, until the organization’s expires_at.
conflict — 409 Conflict
Section titled “conflict — 409 Conflict”The request conflicts with the current state of a resource.
Common causes:
- Creating a hold that overlaps an existing hold with equal or higher priority (“An overlapping hold with equal or higher priority already exists”)
- Calling
PUT /v1/events/:id/confirmor/releaseon an event whosestatusis nothold(“Event is not in hold status”) - Calling
PUT /v1/events/:id/confirmon a hold whosehold_expires_athas passed (“Hold has already expired”) - Responding to or resolving a scheduling proposal that is no longer in the
pendingstate (“Proposal is not in a pending state”) - Submitting a second response from the same agent to the same proposal (“Agent has already responded to this proposal”)
- Rotating a webhook’s signing secret while another request rotates it
- Passing
occurrence_startonDELETEfor an event that is not a recurring series (“Event is not a recurring series”) - Creating an Agent key for a deleted agent — returned as
type: "agent_inactive"(“This agent has been deleted. Create keys only for active or paused agents.”) - Creating a calendar for a deleted agent — returned as
type: "agent_inactive"(“This agent has been deleted. Set its status back to active before adding calendars.”) - Writing to a deleted agent’s calendar — returned as
type: "agent_inactive"(“This calendar’s agent has been deleted, so the calendar is read-only. Set the agent’s status back to active to change it.”). That covers events and holds, availability rules, calendar settings, creating a booking page, creating, responding to or resolving a scheduling proposal, creating, updating, syncing or resuming an iCal subscription, and creating a connection link. Reads and deleting the calendar still work, and so do updating, rotating or deleting an existing booking page and pausing or deleting an iCal subscription. The calendar’s booking pages are unavailable (the public page answers404) while the agent is decommissioned, even if you update them. See Delete (decommission) an agent.
Calendars that refuse overlapping events. On a calendar with prevent_overlaps: true (see Calendars that refuse double bookings) these refusals carry a code (a new hold that collides only with live holds of equal or higher priority still gets the usual hold conflict, with no code):
code | Returned by | Cause | How to fix |
|---|---|---|---|
event_conflict | Creating or moving an event, setting a cancelled event back to confirmed or tentative, confirming a hold, resolving a scheduling proposal | The time overlaps an active event on the calendar. conflicting_event_ids lists up to 10 of them | Pick another time. Don’t retry the same one. If conflicting_event_ids is empty, the event in the way moved meanwhile: send the request again |
recurring_on_protected_calendar | Creating a recurring series; adding or changing a recurrence_rule; moving, re-timing (timezone) or reactivating a series | Such a calendar cannot hold a recurring series | Put the series on another calendar |
calendar_has_overlaps | PATCH /v1/calendars/:id with prevent_overlaps: true | Active events on the calendar that have not ended yet overlap. conflicting_event_ids lists them (up to 50) | Move, cancel or delete them, then turn the setting on |
calendar_has_recurring_series | PATCH /v1/calendars/:id with prevent_overlaps: true | The calendar has a running recurring series, listed in conflicting_event_ids (up to 25) | End or delete the series, then turn the setting on |
{ "error": { "type": "conflict", "code": "event_conflict", "message": "This calendar refuses overlapping events, and this time overlaps an active event on it", "conflicting_event_ids": ["evt_m1n2o3"], "request_id": "req_abc123" }}A public booking page answers the same situation with 409 slot_conflict and no event IDs.
How to fix: Inspect the error message (and code, when present) to identify the specific conflict. For hold conflicts, raise hold_priority above the existing hold or create the event at a non-overlapping time. For stale proposals, re-fetch the proposal to see its current status before retrying. For duplicate responses, update the existing response rather than creating a new one.
idempotency_conflict — 409 Conflict
Section titled “idempotency_conflict — 409 Conflict”A request with this Idempotency-Key can’t be answered yet.
Common causes:
- An earlier request with the same key is still being processed, and this one is a
PUT,PATCHorDELETE(“Idempotency key is already being processed”). APOSTretry is run again instead and returns the resource the first request created. - Retrying
POST /v1/keysorPOST /v1/webhookswhile the first request with the same key is still running, or after it failed partway. The key or webhook exists, but its secret is only in the first request’s response, so the retry can’t return it. The message names the key or webhook.
How to fix: Wait a moment and retry with the same Idempotency-Key. Once the first request has finished, the retry returns its stored response, secret included. If the first request never finished, revoke the key or delete the webhook named in the message, then create a new one with a new Idempotency-Key.
idempotency_key_mismatch — 409 Conflict
Section titled “idempotency_key_mismatch — 409 Conflict”The Idempotency-Key was already used for a different request (a different method, path or body) in the last 24 hours, or by another kind of credential: a stored response is only replayed to the same Agent key’s agent, to an Organization key, or to a console session, whichever sent the first request. A create also answers this when the key already created a resource for another calendar or agent, at any time.
How to fix: Use a new Idempotency-Key for each distinct request. Reuse a key only to retry the exact same request with the same kind of credential.
invite_closed — 410 Gone
Section titled “invite_closed — 410 Gone”An early-access invite link was used after Chronary became generally available. Invite links no longer create accounts.
{ "error": { "type": "invite_closed", "message": "Early-access invites closed when Chronary became generally available. Create an account with the normal sign-up instead.", "sign_up_url": "https://console.chronary.ai/signup", "request_id": "req_abc123" }}How to fix: Don’t retry. Create an account at the sign_up_url, or let your agent sign itself up with POST /v1/agent/sign-up.
payload_too_large — 413 Content Too Large
Section titled “payload_too_large — 413 Content Too Large”The request body is larger than the endpoint accepts. Authenticated API and MCP requests accept up to 1 MB; public sign-up, sign-in, invite, waitlist and booking-page forms accept up to 32 KB.
{ "error": { "type": "payload_too_large", "message": "Request body exceeds the 1048576-byte limit for this endpoint.", "request_id": "req_abc123" }}How to fix: Don’t retry the same body. Send less data per request, for example by trimming metadata or splitting the work across several calls.
rate_limit_error — 429 Too Many Requests
Section titled “rate_limit_error — 429 Too Many Requests”You have exceeded the per-key rate limit (10 requests/second on Free, 25 requests/second on Developer, 50 requests/second on Pro), a sign-up limit, or the limit on invalid API keys from one network.
Common causes:
- Sending bursts of requests without throttling
- Running parallel operations without a concurrency limit
- Signing up too many accounts: sign-up is limited per network (one IPv4 address or IPv6 /64, per UTC hour and per UTC day) and, for agent sign-up, per email domain per UTC hour. Large consumer email providers are exempt from the per-domain limit. These waits can be long, so read
Retry-Afterrather than retrying in a loop. - Sending many invalid API keys from one network: see
authentication_error. Fix the key, then retry afterRetry-After.
How to fix: Respect the Retry-After header in the response. Implement exponential backoff with jitter. See the Rate Limits page for a retry code example.
quota_exceeded — 429 Too Many Requests
Section titled “quota_exceeded — 429 Too Many Requests”Your organization has exhausted its monthly quota for a specific resource.
Common causes:
- Hitting the monthly event creation limit on the Free plan (100/mo)
- Exceeding the monthly API call limit (1,000/mo on Free)
- Reaching the concurrent active recurring-series cap (1 on Free, 50 on Developer, 250 on Pro) — delete an existing series to free a slot
A Free organization at its calendar limit gets:
{ "error": { "type": "quota_exceeded", "message": "Calendar limit of 1 reached on your plan.", "metric": "calendars", "limit": 1, "upgrade_url": "https://console.chronary.ai/settings/billing", "upgrade_plan": "developer", "docs_url": "https://docs.chronary.ai/resources/rate-limits/#monthly-quotas-by-plan", "request_id": "req_abc123" }}Every quota error includes metric (the same value POST /v1/billing/upgrade-requests accepts), limit, docs_url, and request_id, plus one next step:
upgrade_urlandupgrade_planbelow Pro: the console page where a human upgrades, and the plan it leads to (the next plan up):developerfrom Free,profrom Developer.contact_urlon Pro and above: talk to us about a higher limit.- Neither on an agent signup whose email isn’t verified yet: verify the email first.
Monthly quotas reset at the start of each UTC calendar month. As soon as the monthly API-call limit is reached, the account owner gets an email (once per limit each month: reaching a higher limit after verifying or upgrading sends another) saying what is refused, the date the limit resets, and the next step. See Alerts.
Hard and soft limits: on Free and Developer the monthly event, availability-query, proposal, and webhook-delivery limits are hard: once reached, those requests are stopped until the limit resets or you upgrade. On Pro and Custom they are soft: requests past the limit are still served, with a RateLimit-Soft-Exceeded: true response header, and the account owner gets an email. The monthly API-call limit and the count limits (agents, calendars, and so on) are enforced on every plan.
How to fix: Check your current usage with GET /v1/usage. Upgrade your plan, or wait for the reset at the start of the next UTC calendar month. See What to do when you hit a plan limit and Rate Limits for quota details by plan.
internal_error — 500 Internal Server Error
Section titled “internal_error — 500 Internal Server Error”Something went wrong on the Chronary server.
Common causes:
- Transient infrastructure issue
- Unexpected edge case in request processing
How to fix: Retry the request with exponential backoff. If the error persists after multiple retries, contact support with the request_id from the error response.
temporarily_disabled — 503 Service Unavailable
Section titled “temporarily_disabled — 503 Service Unavailable”This feature is paused for a short time, for example while we deal with an incident. The pause applies to everyone, not only to your organization. The response carries a Retry-After header in seconds.
POST /v1/agent/sign-up/anonymous also answers this when its daily cap can’t be checked for a moment. Nothing is created, and neither the day’s sign-ups nor your network’s are used up.
{ "error": { "type": "temporarily_disabled", "message": "This feature is temporarily disabled. Please try again later.", "request_id": "req_abc123" }}How to fix: Retry after the Retry-After delay, with backoff. Nothing is wrong with your request or your account. If the error lasts longer than you expect, contact support with the request_id.
anonymous_signup_disabled — 503 Service Unavailable
Section titled “anonymous_signup_disabled — 503 Service Unavailable”POST /v1/agent/sign-up/anonymous (sign-up without an email) is switched off on this environment.
How to fix: Sign up with an email through POST /v1/agent/sign-up instead.
anonymous_signup_capacity — 503 Service Unavailable
Section titled “anonymous_signup_capacity — 503 Service Unavailable”Today’s sign-ups without an email are used up across Chronary. The response carries a Retry-After header in seconds (until the next UTC day).
How to fix: Retry after the Retry-After delay, or sign up with an email through POST /v1/agent/sign-up.
signups_paused — 503 Service Unavailable
Section titled “signups_paused — 503 Service Unavailable”New sign-ups are paused, so POST /v1/agent/sign-up/anonymous created nothing. (The email sign-up answers the same pause with a 202 and puts the address on the waitlist.)
How to fix: Try again later, or sign up with an email through POST /v1/agent/sign-up to join the waitlist.
What to do when you hit a plan limit
Section titled “What to do when you hit a plan limit”A 403 plan_required or a 429 quota_exceeded will not clear by retrying. An agent can’t pay, cancel, or change payment methods, but it can ask its human to upgrade:
- Don’t retry in a loop.
GET /v1/billing— see the current plan and whether a request is already pending.POST /v1/billing/upgrade-requests— pass thefeature(fromplan_required) ormetric(fromquota_exceeded) and a shortreason.- Give the returned
approval_urlto your human. They complete a secure checkout. GET /v1/billing/upgrade-requests/{id}— poll at most once a minute untilstatusis no longerpending.- After
status: completed, retry the original call about 15 seconds later.
The upgrade_url on the error is the console page a human can open directly; approval_url is the better link to hand over because it takes them straight to your request. If you receive 409 unsupported_plan, the error includes a contact_url instead. If you receive 409 founding_offer_pending, the account joined during early access and Pro is still free — the founding member offer opens at launch, so don’t ask your human to pay yet. On a limit error, upgrade_plan says which plan upgrade_url leads to (developer or pro), so you can tell your human which one to choose. See Billing for the full API, and the SDK, CLI, and MCP equivalents:
- TypeScript:
client.billing.upgradeRequests.create(...); catchPlanRequiredError/QuotaExceededErrorand readerr.upgradeUrl,err.requiredPlan,err.feature,err.metric,err.limit. - Python:
client.billing.upgrade_requests.create(...); catchPlanRequiredError/QuotaExceededErrorand reade.upgrade_url,e.required_plan,e.feature,e.metric,e.limit. - Go:
client.Billing.CreateUpgradeRequest(...);errors.Is(err, chronary.ErrPlanRequired)and readUpgradeURLfrom the*chronary.Error. - CLI:
chronary billing request-upgrade --wait. - MCP:
get_billing, thenrequest_upgrade.
Handling errors with the Python SDK
Section titled “Handling errors with the Python SDK”The Python SDK maps each error type to a specific exception class. All exceptions inherit from ChronaryError:
ChronaryError└── APIError ├── APIConnectionError │ └── APITimeoutError └── APIStatusError ├── BadRequestError (400) ├── AuthenticationError (401) ├── PermissionDeniedError (403) ├── NotFoundError (404) ├── RateLimitError (429) ├── QuotaExceededError (429) └── InternalServerError (500+)Catching specific errors
Section titled “Catching specific errors”from chronary import ( Chronary, NotFoundError, RateLimitError, QuotaExceededError, AuthenticationError, BadRequestError, APIError,)
client = Chronary()
try: agent = client.agents.get("agt_nonexistent")except NotFoundError as e: print(f"Not found: {e.message}") print(f"Request ID: {e.request_id}")except RateLimitError as e: print(f"Rate limited: {e.message}")except QuotaExceededError as e: print(f"Quota exceeded: {e.message}")except AuthenticationError as e: print(f"Invalid API key: {e.message}")except BadRequestError as e: print(f"Validation error on '{e.param}': {e.message}")except APIError as e: # Catch-all for any API error print(f"API error ({e.status_code}): {e.message}")Error attributes
Section titled “Error attributes”APIStatusError exceptions (and all subclasses) expose:
| Attribute | Type | Description |
|---|---|---|
status_code | int | HTTP status code |
message | str | Human-readable error message |
request_id | str | None | Unique request ID for debugging |
error_type | str | None | Machine-readable error type |
param | str | None | The parameter that caused the error |
upgrade_url | str | None | Where a human can upgrade (plan_required, quota_exceeded) |
docs_url | str | None | Documentation link (plan_required) |
required_plan | str | None | Plan that includes the feature (plan_required) |
feature | str | None | The gated feature (plan_required) |
contact_url | str | None | Contact link for plans that need a conversation |
metric | str | None | The exhausted quota metric (quota_exceeded) |
limit | int | None | The quota limit that was hit (quota_exceeded) |
code | str | None | The specific reason within the type, such as event_conflict |
conflicting_event_ids | list[str] | The events in the way on a double-booking 409 (empty otherwise) |
body | Any | The raw response body |
Configuring retries
Section titled “Configuring retries”The SDK automatically retries on 429 and 5xx errors with exponential backoff:
# Increase retries for reliability-critical codeclient = Chronary(max_retries=5, timeout=30.0)
# Disable retries entirelyclient = Chronary(max_retries=0)A Retry-After header of up to 60 seconds is waited out before the retry. A response whose Retry-After is longer than 60 seconds (such as an iCal sync cooldown or a daily sign-up cap), and a monthly quota error (quota_exceeded), are raised at once instead of retried. See Rate Limits for more details.
Using request_id for debugging
Section titled “Using request_id for debugging”Every API response — successful or not — includes a request_id in the response body and as the X-Request-Id response header. This ID uniquely identifies your request in Chronary’s logging infrastructure.
When contacting support about an error:
- Include the
request_idfrom the error response - Note the approximate time the error occurred
- Include the endpoint and method you called
This allows the support team to trace the exact request through the system and diagnose the issue quickly.
# The request_id appears in both the response body and headerscurl -v https://api.chronary.ai/v1/agents/agt_nonexistent \ -H "Authorization: Bearer chr_sk_your_key_here"
# Response header: X-Request-Id: req_abc123# Response body:# {# "error": {# "type": "not_found",# "message": "Agent not found",# "param": null,# "request_id": "req_abc123"# }# }