Skip to main content
The abort node immediately stops flow execution and returns an error response to the client. Use it when you encounter critical errors that should halt processing.

Configuration

{
  "id": "validation_error",
  "type": "abort",
  "config": {
    "status": 400,
    "message": "Invalid request data"
  }
}

Config Fields

FieldTypeRequiredDefaultDescription
statusnumberNo400HTTP status code
messagestringNo"Request aborted"Error message
bodyanyNo-Custom response body (overrides message)

Response Behavior

The abort node generates a response based on configuration:
  1. If body is provided, it becomes the response body
  2. If only message is provided, response is { "error": "<message>" }
  3. If neither is provided, response is { "error": "Request aborted" }

Examples

Simple Error Message

{
  "id": "abort_invalid",
  "type": "abort",
  "config": {
    "status": 400,
    "message": "Invalid user ID format"
  }
}
Response:
{
  "error": "Invalid user ID format"
}

Custom Error Body

{
  "id": "abort_detailed",
  "type": "abort",
  "config": {
    "status": 422,
    "body": {
      "success": false,
      "error": "validation_failed",
      "message": "{{error_message}}",
      "details": "{{validation_errors}}"
    }
  }
}

Not Found Error

{
  "id": "not_found",
  "type": "abort",
  "config": {
    "status": 404,
    "body": {
      "error": "not_found",
      "message": "User {{request.params.id}} not found"
    }
  }
}

Unauthorized Error

{
  "id": "unauthorized",
  "type": "abort",
  "config": {
    "status": 401,
    "message": "Invalid or expired token"
  }
}

Dynamic Error Message

{
  "id": "abort_dynamic",
  "type": "abort",
  "config": {
    "status": 400,
    "message": "{{validation_result.first_error}}"
  }
}

Common Use Cases

After Failed Validation

[
  {
    "id": "check_auth",
    "type": "condition",
    "config": {
      "conditions": [
        { "if": "{{auth.valid}} == false", "then": ["abort_auth"] }
      ],
      "else": ["continue_processing"]
    }
  },
  {
    "id": "abort_auth",
    "type": "abort",
    "config": {
      "status": 401,
      "body": {
        "error": "unauthorized",
        "message": "Authentication required"
      }
    }
  }
]

Rate Limit Exceeded

{
  "id": "rate_limited",
  "type": "abort",
  "config": {
    "status": 429,
    "body": {
      "error": "rate_limit_exceeded",
      "message": "Too many requests",
      "retry_after": 60
    }
  }
}

Missing Required Resource

{
  "id": "resource_missing",
  "type": "abort",
  "config": {
    "status": 404,
    "body": {
      "error": "resource_not_found",
      "resource_type": "order",
      "resource_id": "{{request.params.order_id}}"
    }
  }
}

vs Response Node

AbortResponse
Error terminationNormal termination
Typically 4xx/5xx statusAny status code
Stops immediatelyEnds flow normally
Skips remaining nodesFinal node in flow path
Use abort for unexpected errors that should stop processing. Use response for normal flow completion, including handled error responses.

Common Status Codes

CodeMeaningUse Case
400Bad RequestInvalid input
401UnauthorizedMissing or invalid auth
403ForbiddenInsufficient permissions
404Not FoundResource doesn’t exist
409ConflictResource state conflict
422Unprocessable EntityValidation failed
429Too Many RequestsRate limit exceeded
500Internal Server ErrorUnexpected error
503Service UnavailableDependency down