Fixed missing error codes and error tests.