From 5bb36bbade2d185bb14eb6174a3910e42e184aef Mon Sep 17 00:00:00 2001 From: Anish Shrestha Date: Mon, 22 Jan 2018 12:53:24 +0545 Subject: [PATCH] Issue #380 --- graphene_django/rest_framework/mutation.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/graphene_django/rest_framework/mutation.py b/graphene_django/rest_framework/mutation.py index a776eab..00c8c5d 100644 --- a/graphene_django/rest_framework/mutation.py +++ b/graphene_django/rest_framework/mutation.py @@ -74,12 +74,8 @@ class SerializerMutation(ClientIDMutation): if serializer.is_valid(): return cls.perform_mutate(serializer, info) else: - errors = [ - ErrorType(field=key, messages=value) - for key, value in serializer.errors.items() - ] - - return cls(errors=errors) + errors = serializer.errors + raise Exception(errors) @classmethod def perform_mutate(cls, serializer, info):