Add test coverage for error codes and types.