diff --git a/angel_graphql/lib/src/graphql_http.dart b/angel_graphql/lib/src/graphql_http.dart index c936be75..0de6a02b 100644 --- a/angel_graphql/lib/src/graphql_http.dart +++ b/angel_graphql/lib/src/graphql_http.dart @@ -48,6 +48,14 @@ RequestHandler graphQLHttp(GraphQL graphQl) { } else { throw new AngelHttpException.badRequest(); } + } on ValidationException catch (e) { + var errors = [ + new GraphQLExceptionError(e.message) + ]; + + errors + .addAll(e.errors.map((ee) => new GraphQLExceptionError(ee)).toList()); + return new GraphQLException(errors).toJson(); } on AngelHttpException catch (e) { var errors = [ new GraphQLExceptionError(e.message)