Add ErrorCode type and test