]> gitweb.erp-flowers.ru Git - erp24_rep/yii-erp24/.git/commit
fix(ERP-241): use InvalidArgumentException in TimetableService for proper error display origin/feature_filippov_ERP-241_fix_api3_timetable_exception
authorAleksey Filippov <Aleksey.Filippov@erp-flowers.ru>
Thu, 26 Feb 2026 15:47:41 +0000 (18:47 +0300)
committerAleksey Filippov <Aleksey.Filippov@erp-flowers.ru>
Thu, 26 Feb 2026 15:47:41 +0000 (18:47 +0300)
commit4ce55db65887007486bc741f8bff02128d001d57
treef553fc965739b0908c5119239265b778ba2a95c5
parentd0e2789f1c6d46e60e4b278e409a0925c9e374bd
fix(ERP-241): use InvalidArgumentException in TimetableService for proper error display

TimetableService threw generic \Exception which EventBehavior couldn't
handle, causing "Произошла неизвестная ошибка" in mobile app instead of
actual validation messages. Changed to InvalidArgumentException (matching
pattern used by all other api3 services) and switched from Json::encode
to firstErrors[0] for human-readable messages.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
erp24/api3/core/services/TimetableService.php
erp24/tests/unit/services/TimetableServiceExceptionTest.php [new file with mode: 0644]