msg in the exception + simpler conversion to json