              obj = queryset.get()
          except ObjectDoesNotExist:
              raise ValidationError(self.error_messages['does_not_exist'])
          except (TypeError, ValueError):
              msg = self.error_messages['invalid']
              raise ValidationError(msg)
  
          return obj
  
  
  class ManyHyperlinkedRelatedField(ManyRelatedMixin, HyperlinkedRelatedField):
 
</s> remove             msg = self.error_messages['invalid']
 </s> add             received = type(data).__name__
            msg = self.error_messages['incorrect_type'] % received </s> remove             msg = self.error_messages['invalid']
 </s> add             received = type(data).__name__
            msg = self.error_messages['incorrect_type'] % received </s> remove             msg = self.error_messages['invalid']
            raise ValidationError(msg)
 </s> add             msg = self.error_messages['incorrect_type']
            raise ValidationError(msg % type(value).__name__) </s> remove         serializer = NullableSlugSourceSerializer(data=data)
 </s> add         serializer = NullableForeignKeySourceSerializer(data=data) </s> remove         serializer = NullableSlugSourceSerializer(data=data)
 </s> add         serializer = NullableForeignKeySourceSerializer(data=data)
            msg = self.error_messages['incorrect_type']
            raise ValidationError(msg % type(value).__name__)
              obj = queryset.get()
          except ObjectDoesNotExist:
              raise ValidationError(self.error_messages['does_not_exist'])
          except (TypeError, ValueError):
            msg = self.error_messages['incorrect_type']
            raise ValidationError(msg % type(value).__name__)
            msg = self.error_messages['incorrect_type']
            raise ValidationError(msg % type(value).__name__)
  
          return obj
  
  
  class ManyHyperlinkedRelatedField(ManyRelatedMixin, HyperlinkedRelatedField):
keep keep keep keep replace replace keep keep keep keep keep
 Raise Validation Errors when relationships receive incorrect types. Fixes #590. 
rest_framework/relations.py