Problem
Service handlers that route into coordinator methods raising bare ValueError (locked-avatar choose_avatar, over-balance / self / unknown-child gift_points, unknown-id undo_transaction, request_swap, task-group ops, etc.) surface the error unhandled. Over the frontend WebSocket path (the cards, the admin panel, Dev Tools "Perform action") this becomes a failed call with no clean message and a full traceback in the HA log on every routine rejection.
Verified on the ha-dev instance (HA 2026.6.3): gift_points over balance, gift_points to self, choose_avatar with a locked avatar, undo_transaction/request_swap with a bad id all produced unhandled errors + tracebacks. State was never corrupted — the validations correctly reject the bad op; only the error handling was wrong. The card UI already guards the avatar gate client-side, so the main impact is automations/Dev Tools callers and log spam.
Fix
Wrap the service handlers so coordinator ValueError is re-raised as homeassistant.exceptions.ServiceValidationError (the same pattern complete_chore already uses). ServiceValidationError returns a clean service_validation_error result over the WebSocket API with the human-readable message and is logged as a single line, not a traceback.
A reusable _safe decorator is composed into the existing _admin wrapper (covers all admin-gated handlers) and applied to the remaining bare handlers.
Problem
Service handlers that route into coordinator methods raising bare
ValueError(locked-avatarchoose_avatar, over-balance / self / unknown-childgift_points, unknown-idundo_transaction,request_swap, task-group ops, etc.) surface the error unhandled. Over the frontend WebSocket path (the cards, the admin panel, Dev Tools "Perform action") this becomes a failed call with no clean message and a full traceback in the HA log on every routine rejection.Verified on the ha-dev instance (HA 2026.6.3):
gift_pointsover balance,gift_pointsto self,choose_avatarwith a locked avatar,undo_transaction/request_swapwith a bad id all produced unhandled errors + tracebacks. State was never corrupted — the validations correctly reject the bad op; only the error handling was wrong. The card UI already guards the avatar gate client-side, so the main impact is automations/Dev Tools callers and log spam.Fix
Wrap the service handlers so coordinator
ValueErroris re-raised ashomeassistant.exceptions.ServiceValidationError(the same patterncomplete_chorealready uses).ServiceValidationErrorreturns a cleanservice_validation_errorresult over the WebSocket API with the human-readable message and is logged as a single line, not a traceback.A reusable
_safedecorator is composed into the existing_adminwrapper (covers all admin-gated handlers) and applied to the remaining bare handlers.