Skip to content

Commit 1415531

Browse files
committed
Return all graphql errors to client
1 parent 43cab17 commit 1415531

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

cylc/flow/network/server.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -417,9 +417,10 @@ def graphql(
417417
)
418418
if executed.errors:
419419
for error in executed.errors:
420-
LOG.warning(error)
421-
if not executed.data:
422-
raise Exception(executed.errors[0])
420+
LOG.warning(f"GraphQL: {error}")
421+
# If there are execution errors, it means there was an unexpected
422+
# error, so fail the command.
423+
raise Exception(*executed.errors)
423424
return executed.data
424425

425426
# UIServer Data Commands

0 commit comments

Comments
 (0)