Skip to content

Commit e5e4507

Browse files
authored
refactor: strip html tags from error messages (#61)
1 parent 9e0c9e2 commit e5e4507

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

frappe_graphql/api.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
from typing import List
33

44
import frappe
5-
from frappe.utils import cint
5+
from frappe.utils import cint, strip_html_tags
66
from . import get_schema
77
from .graphql import execute
88
from .utils.depth_limit_validator import depth_limit_validator
@@ -41,6 +41,7 @@ def execute_gql_query():
4141
for err in output.errors:
4242
if isinstance(err, GraphQLError):
4343
err = err.formatted
44+
err['message'] = strip_html_tags(err.get("message"))
4445
errors.append(err)
4546
output.errors = errors
4647

0 commit comments

Comments
 (0)