add a TODO to describe the error codes
correct bug to retrive error code
update Unit tests