[LC] add Brisket.onError

I think we can do this in the separate PR, currently, we only need onError.