Hi Anil Onur Canbaz,
Please check the user manual protocol status register:

You can find bit2:0 is just your _can_error_flags, so when you use the CAN_GetStatusFlags
__STATIC_INLINE uint32_t CAN_GetStatusFlags(CAN_Type *base)
{
return base->PSR;
}
get the PSR register, you can check bit2:0 is which one, then you can know which error happens.
There no API about it, because it is very simple, you can write the code by yourself to check it.
Wish it helps you!
Have a great day,
Kerry
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------