bitrix-result-and-errors

Installation
SKILL.md

Result and Error

Baseline: main 23.0+ · Verified: main 26.800.0

Contract

  • Expected failures (validation, business rule, not found, no rights) → Result with Errors.
  • Broken state or contract (module missing, DB down, misconfiguration, bug) → exception.
  • One method, one contract: always a Result, or a value plus exceptions for the exceptional case. Never bool/null/-1/['error' => …].

Bitrix\Main\Result

use Bitrix\Main\Error;
use Bitrix\Main\Result;
Installs
295
GitHub Stars
48
First Seen
Jul 16, 2026