more defensive get_cached_payload function

@czue 
fwiw, it is legal to `return ...` right here inside the try block. The finally clause will still be executed.