Add status codes for errors. #1336