Hello Constantin,
Unfortunately, there is no such possibility for custom commands. However, you can send an email notification if certain operations are failing. To do so, a business rule triggering after the operations execution can be used. In the rule the operation result must be checked and if it is failed, then send the notification. For example, to send an email notification if the create user operation fails, a business rule like below can be used: