# Stack behavior if error\_passive

**URL:** <https://forum.opencyphal.org/t/stack-behavior-if-error-passive/700>\
**Category:** LibCyphal\
**Created:** [November 29, 2019, 10:58am UTC](https://forum.opencyphal.org/t/stack-behavior-if-error-passive/700 "2019-11-29T10:58:48Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![deekay](https://forum.opencyphal.org/letter_avatar_proxy/v4/letter/d/8491ac/32.png) [@deekay](https://forum.opencyphal.org/u/deekay)\
**Post date:** [November 29, 2019, 10:58am UTC](https://forum.opencyphal.org/t/stack-behavior-if-error-passive/700/1 "2019-11-29T10:58:48Z")

</div>

How does the stack handle underlying errors in socketCan such as when it enters error states?  
For example ERROR-PASSIVE or BUS-OFF?

I do not see an error code for it in error.hpp, if not ErrFailure is used for it?

Or is it better to monitor the socketCan state in parallell and reset the node if socketCan error states are entered?

Regards

---

<div class="post-metadata">

**Author:** ![pavel.kirienko](https://forum.opencyphal.org/user_avatar/forum.opencyphal.org/pavel.kirienko/32/9_2.png) [@pavel.kirienko](https://forum.opencyphal.org/u/pavel.kirienko)\
**Post date:** [December 6, 2019, 7:53pm UTC](https://forum.opencyphal.org/t/stack-behavior-if-error-passive/700/2 "2019-12-06T19:53:26Z")

</div>

Libuavcan does not handle CAN error states – it plows through regardless. If a different behavior is desired, consider implementing it in the application by querying the underlying driver directly. I feel like paging @scottdixon just to keep him in the loop.

---

<div class="post-metadata">

**Author:** ![scottdixon](https://forum.opencyphal.org/user_avatar/forum.opencyphal.org/scottdixon/32/39_2.png) [@scottdixon](https://forum.opencyphal.org/u/scottdixon)\
**Post date:** [December 6, 2019, 8:30pm UTC](https://forum.opencyphal.org/t/stack-behavior-if-error-passive/700/3 "2019-12-06T20:30:43Z")

</div>

This is correct. In v1 we continue with this design where the media layer does not abstract CAN error states but encourages the integrator to expose them from the concrete driver so applications can apply any “back on bus” logic or other bus error state handling that is appropriate for their system.

---

<div class="post-metadata">

**Author:** ![deekay](https://forum.opencyphal.org/letter_avatar_proxy/v4/letter/d/8491ac/32.png) [@deekay](https://forum.opencyphal.org/u/deekay)\
**Post date:** [December 6, 2019, 8:59pm UTC](https://forum.opencyphal.org/t/stack-behavior-if-error-passive/700/4 "2019-12-06T20:59:48Z")

</div>

Thanks guys!  
Good to know, I’ll monitor bus states in app.
