added error codes to documentation