Error codes

Signed-off-by: Marco Rivadeneyra <marcorivm@gmail.com>