make sure we return error message and sql state in Encoding.default_internal if set