Add ret code for common errors.