Attach key value metadata to errors.