FreeRTOS+IO: How to report errors from the FreeRTOS_write() operation?

I write a driver based on the FreeRTOS+IO system and wondered how to report errors from my implementation of FreeRTOS_write()? I checked also the PeripheralControlt which has no status ‘error’ either. I could return zero bytes written, but in some cases this may be just a valid result triggering a retry. Is there a better way of doing this?

FreeRTOS+IO: How to report errors from the FreeRTOS_write() operation?

That code is due for a re-write. For now would suggest just adding an error value into the structure.