---
id: post/miljan-rs/966
type: post
title: "When “Errors” Don’t Stop the Process: A Hidden Risk in Business Central"
summary: ErrorBehavior::Collect is an AL attribute that allows procedures to continue processing after errors instead of rolling back, risking partial data updates. Understanding when to use it safely matters for maintaining data consistency in bulk operations and background processes.
tier: community
language: en
tags:
  - error handling
  - al development
  - data consistency
  - transaction management
  - code patterns
system: development
review:
  state: reviewed
  by: opus
  at: "2026-10-25T12:52:23.012Z"
  flags: []
generated:
  at: "2026-10-25T12:26:48.227Z"
  pipeline: 0.2.0
  prompts:
    extract-post: 1
  input_hash: b60fc250b7c26ca66cace4a33d2e76a697ce68552a4fcc416238315e012e9f24
evidence:
  - kind: blog
    url: https://miljan.rs/2025/12/29/when-errors-dont-stop-the-process-a-hidden-risk-in-business-central/
    title: "When “Errors” Don’t Stop the Process: A Hidden Risk in Business Central"
    date: "2025-12-29"
    commit: null
    t: null
    quote: null
  - kind: blog
    url: https://miljan.rs/2025/12/29/when-errors-dont-stop-the-process-a-hidden-risk-in-business-central/
    title: "When “Errors” Don’t Stop the Process: A Hidden Risk in Business Central"
    date: "2025-12-29"
    commit: null
    t: null
    quote: With it enabled, the system can continue processing even after errors, and successful changes may still be saved instead of being undone automatically.
  - kind: blog
    url: https://miljan.rs/2025/12/29/when-errors-dont-stop-the-process-a-hidden-risk-in-business-central/
    title: "When “Errors” Don’t Stop the Process: A Hidden Risk in Business Central"
    date: "2025-12-29"
    commit: null
    t: null
    quote: "If not, it can create confusing states like: some flags/statuses updated but dependent steps missing, part of a batch processed, part not."
  - kind: blog
    url: https://miljan.rs/2025/12/29/when-errors-dont-stop-the-process-a-hidden-risk-in-business-central/
    title: "When “Errors” Don’t Stop the Process: A Hidden Risk in Business Central"
    date: "2025-12-29"
    commit: null
    t: null
    quote: If partial completion would confuse users or risk data consistency, don't apply Collect to the processing path.
links:
  learn: []
  objects:
    - object/codeunit/9078
    - object/codeunit/21
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
post_id: "966"
source_id: miljan-rs
source_name: miljan.rs
url: https://miljan.rs/2025/12/29/when-errors-dont-stop-the-process-a-hidden-risk-in-business-central/
published_at: "2025-12-29T07:00:00.000Z"
author: Miljan Milosavljević
full_text: false
words: 784
quotes:
  - text: With it enabled, the system can continue processing even after errors, and successful changes may still be saved instead of being undone automatically.
    why_it_matters: Explains the fundamental difference ErrorBehavior::Collect introduces to the default error handling model
  - text: "If not, it can create confusing states like: some flags/statuses updated but dependent steps missing, part of a batch processed, part not."
    why_it_matters: Illustrates the practical dangers of using this feature in processing code
  - text: If partial completion would confuse users or risk data consistency, don't apply Collect to the processing path.
    why_it_matters: Provides the key rule for deciding when to safely use this attribute
code_objects_mentioned:
  - codeunit Check Item Jnl. Line. Backgr.
  - codeunit Item Jnl.-Check Line
systems:
  - development
versions_mentioned: []
cautions:
  - kind: warning
    quote: the code can keep going after errors, and you may end up with partial updates committed to the database
    objects: []
    events: []
    versions: []
  - kind: gotcha
    quote: using Collect directly on processing procedures can be risky
    objects: []
    events: []
    versions: []
preview:
  embeddable: true
  frame_url: https://miljan.rs/2025/12/29/when-errors-dont-stop-the-process-a-hidden-risk-in-business-central/embed/
  image: https://i0.wp.com/miljan.rs/wp-content/uploads/2025/12/conveyorbelt.png?fit=1200%2C800&ssl=1
  image_alt: null
  image_w: 1200
  image_h: 800
  site_name: Miljan's Blog
  favicon: https://s1.wp.com/i/favicon.ico?m=1713425267i
  probed_at: "2026-10-25T12:31:17.550Z"
---

# When “Errors” Don’t Stop the Process: A Hidden Risk in Business Central

[Read the post](https://miljan.rs/2025/12/29/when-errors-dont-stop-the-process-a-hidden-risk-in-business-central/) · miljan.rs (Miljan Milosavljević, MVP) · 2025-12-29 · 784 words · tier community · reviewed (checked by Opus)

> ErrorBehavior::Collect is an AL attribute that allows procedures to continue processing after errors instead of rolling back, risking partial data updates. Understanding when to use it safely matters for maintaining data consistency in bulk operations and background processes.

## Key points

- ErrorBehavior::Collect allows code to continue after errors and save successful changes, creating a partial success model instead of fail-fast rollback
- The main risk is applying this attribute to processing procedures like Post() instead of validation, leading to logically inconsistent or half-processed states
- Microsoft typically uses ErrorBehavior::Collect only on check/validation procedures, not on actual processing code
- Safe usage pattern: validate first with error collection, then process normally with fail-fast behavior if validation passes

## Quotes

- "With it enabled, the system can continue processing even after errors, and successful changes may still be saved instead of being undone automatically." (Explains the fundamental difference ErrorBehavior::Collect introduces to the default error handling model)
- "If not, it can create confusing states like: some flags/statuses updated but dependent steps missing, part of a batch processed, part not." (Illustrates the practical dangers of using this feature in processing code)
- "If partial completion would confuse users or risk data consistency, don't apply Collect to the processing path." (Provides the key rule for deciding when to safely use this attribute)

## AL objects mentioned

As named in the post. A name that matches one object page by exact type and name links to it; the others stay as named.

- [codeunit 9078 "Check Item Jnl. Line. Backgr."](../../objects/codeunit/9078.md)
- [codeunit 21 "Item Jnl.-Check Line"](../../objects/codeunit/21.md)

## Heads up

- warning: "the code can keep going after errors, and you may end up with partial updates committed to the database"
- gotcha: "using Collect directly on processing procedures can be risky"

## Context

- Features: ErrorBehavior::Collect attribute, error collection, partial success processing, validation procedures, transaction rollback control

Source: miljan.rs, community blog. Summary, key points and quotes are derived (CONTENT-NOTICE.md); read the original for the full text.
