Ensure gsub works on error[‘message’] with to_s

Saw an issue in real world usage where error[‘message’] was nil