improve invoke error definitions
fix test 422