The code of Hammurabi is not a complete code of law. Instead it appears to just be a list of prior judgements made that Hammurabi supported. There are too many scenarios that are not listed to be a complete law code.
The Great Courses – Ancient Mesopotamia