Skip to main content
Altcraft Docs LogoAltcraft Docs Logo
User guide iconUser guide
Developer guide iconDeveloper guide
Admin guide iconAdmin guide
English
  • Русский
  • English
Login
    Getting StartedAdministrator documentationFunctional characteristics
      Technology descriptionarrow
    • Architecture OverviewComponent Description
        Deployment schemesarrow
      • Basic schemeFail-safe schemeTypical Placement in Infrastructure
    System requirements
      Admin Panelarrow
      • Account areaarrow
        • Accountsarrow
        • Account UsersAccount Virtual SendersAccount Database Indexes
        TariffsExternal data configurationLDAPTasksSchedule JobsGlobal Stop ListsWebversion Store Policies
        Settingsarrow
      • Databases
          Accessarrow
        • AdminsAPI tokens
        Notifiers
          MTAarrow
        • Default rulesRetry rulesLock rulesBounce patternsStrategiesKeysISPsPools
      Nodes
        Sendersarrow
      • EmailSMSEvent generatorIntegration with Altcraft Cloud SMTPIntegration with Sendsay
        Reportsarrow
      • Audit JournalData Usage
        Toolsarrow
      • ARF decoderURL decoderSMID decoderLicense
      Platform installationarrow
    • Automatic installationManual installationRunning the platform in a Docker container
      Platform configurationarrow
    • Configuration fileDomain settingsLDAP access configurationSending Email via SMTP relayPixel and push domain configurationCluster and Replication SetupSystem notifications configurationProcesses UNIX sockets configurationHTTPS ConfigurationMigrating from MongoDB Community Edition to Percona Server for MongoDBAdding sender IP addressesDeduplication request settingsPostgreSQL database for Market dataProxy server settingsKeycloak Integration with AltcraftGetting HTTP service statusesConfiguring MongoDB log rotation
        Configuration of system constants and directoriesarrow
      • Filtering bot actionsDirectory of gender markers
      Custom Channelsarrow
    • Creating a Channel
        Pipelinesarrow
      • MessageScheduleListenerModerateStop
          Pipesarrow
        • HTTP RequestPackUnpackEventerSchedulerSelectorSQLStore SetStore GetLogResultError
      External Objects (Entities)Templating LanguageSending FilesPresets (Field Sets)DebuggingTechnical Limitations
      Platform maintenancearrow
    • Personnel requirementsPlatform maintenance processesPlatform updatingBackup and recoveryTransferring the platform to a new serverCreating, deleting, and populating tables for statistics in ClickHouseUsing the aktool utilityUsers and directories engaged by the platformPlatform service monitoringProcess and mailing monitoring via Prometheus
      Extraarrow
    • System page customizationSend Message IDClickHouse History Migration GuideInstructions for migrating history to ClickHouseUtility for importing push subscriptions to Firebase projectUtility for importing push subscriptions to Firebase projectENS: настройка интеграции
    Processing HTTP/HTTPS traffic
      Administrator APIarrow
      • Accounts admin apiarrow
        • Restricted accessarrow
        • Account Activation and DeactivationAccount Freeze and Unfreeze
        Get accounts listAdd a new accountDelete the account
        Account usersarrow
      • Update an Existing AccountAdd a new userDelete a userGet a list of usersSending a Welcome Email
        Nodesarrow
      • Synchronize node MTA configurationGet nodes listGet node MTA statusActivate node MTADeactivate node MTA
        Senders admin apiarrow
      • Create or update AKMTA senderGet AKMTA sender informationAssign account to senderGet senders listDelete senderRestore sender
          Sender queuearrow
        • Get sender queue informationHold sender queueRelease sender queueClear sender queue
        Virtual sendersarrow
      • Get virtual senders listGet virtual sender informationCreate virtual senderUpdate virtual senderClone virtual senderDelete virtual sender
    Documentation Archive
  • Custom Channels
  • Debugging

Debugging

Logs​

All custom channel pipelines log to procpiper.log. For debugging, it is useful to add Log pipes at key points in the pipeline — before and after HTTP requests, after unpacking the response, before registering events.

Example: logging around an HTTP request​

[
{
"id": 1,
"type": "log",
"params": {
"message": "[Request] URL: $sender.url, method: POST",
"level": "debug"
},
"outs": {
"success": 2
}
},
{
"id": 2,
"type": "http_request",
"params": {
"method": "POST",
"timeout": 10,
"content_type": "json",
"url": "$sender.url",
"success_codes": [200]
},
"outs": {
"success": 3,
"error": 5
}
},
{
"id": 3,
"type": "unpack",
"outs": {
"success": 4,
"error": 5
}
},
{
"id": 4,
"type": "log",
"params": {
"message": "[Response] status: $in.data.status",
"level": "debug"
}
},
{
"id": 5,
"type": "log",
"params": {
"message": "[Error] code: $error.code, message: $error.message",
"level": "error"
}
}
]

Error data​

When any pipe encounters an error, the following variables are available:

VariableDescription
$error.codeError code (number). Not all pipes return a code — see the table below
$error.messageText description of the error. Available for all pipes

Error structure by pipe​

Pipe$error.code$error.message
HTTP RequestYes (HTTP code: 400, 403, 500, etc.)Yes (error description: timeout, connection refused, etc.)
PackNoYes (template error description)
UnpackNoYes (unmarshalling error description)
SQLNoYes (SQL error description)
EventerNoYes (template or format error description)
SchedulerNoYes (template error description)
SelectorNoYes (JsonQL error description)
Store Set / Store GetNoYes (database error description)
LogNoYes (template error description)
ResultNoYes (path error or missing data description)
ErrorNoYes (message template error description)

Use them in Log, Eventer, or Error pipes for diagnostics.

Typical errors​

SQL: forgot map: true in Read operation​

Symptom: Result fails with a data type error. Cause: Without map: true, SQL returns an array []map[string]interface{}, but Result expects an object map[string]interface{}. Solution: Add "map": true to the SQL pipe parameters for the Read operation.

Templating: $ instead of $#​

Symptom: A numeric field arrived as a string, the external API returned a validation error. Cause: The $ prefix always returns a string. The $# prefix preserves the original type. Solution: Use $# for numbers, booleans, arrays, and objects. For example, $#template.discountAmount instead of $template.discountAmount.

Scheduler: did not pass send_message_id in template​

Symptom: Eventer in the Schedule pipeline cannot register an event — $origin.send_message_id is missing. Cause: In Schedule, $origin is replaced with params.template of the Scheduler pipe. Solution: Pass send_message_id explicitly through the template:

{
"template": {
"send_message_id": "$origin.send_message_id",
"external_id": "$#in.data.externalId"
}
}

And access it in Schedule as $origin.send_message_id.

HTTP Request: missing Pack before content_type: json​

Symptom: Error $in.body not found.
Cause: content_type: json reads the body from $in.body, which is formed by the Pack pipe.
Solution: Add a Pack pipe before HTTP Request in the chain.

HTTP Request: $in.body is not a byte array​

Symptom: Data type error for $in.body.
Cause: Pack pipe is not configured or type is not specified.
Solution: Make sure the Pack pipe has "type": "JSON" (or "XML") and is placed before HTTP Request.

Eventer: incorrect channel_id / action_type​

Symptom: Event does not appear in reports and profile history.
Cause: channel_id does not match the numeric ID of the channel, action_type does not match the Event ID of the created event.
Solution: Verify the correspondence in the Events section of the channel: action_type = Event ID of the event.

Selector: error in JsonQL​

Symptom: Event goes to outs.error of the Selector pipe.
Cause: Incorrect JsonQL query syntax or field not found.
Solution: Check the query syntax and make sure the field exists in $in or $template.

Channel verification after creation​

  1. Create a template with minimal content
  2. Create a sender and a subscription (or a resource for indirect)
  3. Send a test mailing
  4. Check procpiper.log — entries from Log pipes should appear
  5. Check events in profile history — a send or undeliv event should appear
  6. If there is an error — add Log pipes before and after the problematic pipe to localize the failure point
Last updated on Jul 21, 2026
Previous
Presets (Field Sets)
Next
Technical Limitations
  • Logs
    • Example: logging around an HTTP request
  • Error data
    • Error structure by pipe
  • Typical errors
    • SQL: forgot map: true in Read operation
    • Templating: $ instead of $#
    • Scheduler: did not pass send_message_id in template
    • HTTP Request: missing Pack before content_type: json
    • HTTP Request: $in.body is not a byte array
    • Eventer: incorrect channel_id / action_type
    • Selector: error in JsonQL
  • Channel verification after creation
© 2015 - 2026 Altcraft, LLC. All rights reserved.