handle logs and metadata when an exception is thrown
merge