func (e *RequestError) UnmarshalInfo(to interface{}) error {
	if reflect.ValueOf(to).Kind() != reflect.Ptr {
		return errors.New("UnmarshalInfo expects a pointer as an argument")
	}

	data, err := json.Marshal(e.Info)
	if err != nil {
		return errors.Annotate(err, "could not marshal error information")
	}
	err = json.Unmarshal(data, to)
	if err != nil {
		return errors.Annotate(err, "could not unmarshal error information to provided target")
	}

	return nil
}
// UnmarshalInfo attempts to unmarshal the information contained in the Info
// field of a RequestError into an object instance a pointer to which is passed
// via the to argument. The method will return an error if a non-pointer arg
// is provided.
UnmarshalInfo attempts to unmarshal the information contained in the Info
field of a RequestError into an object instance a pointer to which is passed
via the to argument. The method will return an error if a non-pointer arg
is provided.
// UnmarshalInfo attempts to unmarshal the information contained in the Info // field of a RequestError into an object instance a pointer to which is passed // via the to argument . The method will return an error if a non - pointer arg // is provided .
func (e *RequestError) UnmarshalInfo(to interface{}) error {
	if reflect.ValueOf(to).Kind() != reflect.Ptr {
		return errors.New("UnmarshalInfo expects a pointer as an argument")
	}
	data, err := json.Marshal(e.Info)
	if err != nil {
		return errors.Annotate(err, "could not marshal error information")
	}
	err = json.Unmarshal(data, to)
	if err != nil {
		return errors.Annotate(err, "could not unmarshal error information to provided target")
	}
	return nil
}
func ( e * RequestError ) UnmarshalInfo ( to interface { } ) error { if reflect . ValueOf ( to ) . Kind ( ) != reflect . Ptr { return errors . New ( " " ) } data , err := json . Marshal ( e . Info ) if err != nil { return errors . Annotate ( err , " " ) } err = json . Unmarshal ( data , to ) if err != nil { return errors . Annotate ( err , " " ) } return nil }
UnmarshalInfo attempts to unmarshal the information contained in the Info
field of a RequestError into an object instance a pointer to which is passed
via the to argument.
UnmarshalInfo attempts to unmarshal the information contained in the Info field of a RequestError into an object instance a pointer to which is passed via the to argument .