Test some error cases in trigger registration