Sending Errors

Learn how to send errors from your applications to Checkend.

Basic Request

Send errors to Checkend using a simple POST request to the /ingest/v1/errors endpoint.

cURL
curl -X POST https://your-checkend-instance.com/ingest/v1/errors \
  -H "Content-Type: application/json" \
  -H "Checkend-Ingestion-Key: your-ingestion-key" \
  -d '{
    "error_class": "NoMethodError",
    "error_message": "undefined method foo for nil:NilClass",
    "backtrace": [
      "app/models/user.rb:42:in validate_email",
      "app/controllers/users_controller.rb:15:in create"
    ]
  }'

Request Body

The request body accepts the following fields:

Field Type Required Description
error_class string Required The error class name
error_message string Required The error message
backtrace array Optional Array of backtrace lines
context object Optional Custom context data
request object Optional Request information (url, method, params)
user_info object Optional User information (id, email, name)
fingerprint string Optional Custom fingerprint for grouping

Full Example

Here's an example with all optional fields:

cURL
curl -X POST https://your-checkend-instance.com/ingest/v1/errors \
  -H "Content-Type: application/json" \
  -H "Checkend-Ingestion-Key: your-ingestion-key" \
  -d '{
    "error_class": "ActiveRecord::RecordNotFound",
    "error_message": "Could not find User with id=123",
    "backtrace": [
      "app/controllers/users_controller.rb:25:in show",
      "actionpack/lib/action_controller/metal/basic_implicit_render.rb:6"
    ],
    "context": {
      "environment": "production",
      "server": "web-1"
    },
    "request": {
      "url": "https://example.com/users/123",
      "method": "GET",
      "params": {"id": "123"}
    },
    "user_info": {
      "id": "456",
      "email": "admin@example.com"
    }
  }'

Error Grouping

By default, errors are grouped by their class name and the first line of the backtrace. You can provide a custom fingerprint to control how errors are grouped. See the Error Grouping guide for details.