> > Your other options and the option you choose are same. >
Sorry typo, I meant ERRCODE_INVALID_OBJECT_DEFINITION.
Did you consider to use ERRCODE_UNDEFINED_COLUMN with error messages like: "type %u does not exit" or "type id %u does not exit"? Errorcode ERRCODE_UNDEFINED_COLUMN seems to be used for syscache lookup failure cases at certain places in code.
But I think, OBJECT will be more appropriate than COLUMN at this place.
However I can change error message to "type id %u does not exit" if this seems better ?