Handle non-mutatable errors

creating a new error and copying over as much data as we need if the error object is unable to be mutated

Fixes #3