MCPcopy Create free account
hub / github.com/dagger/dagger / _query_error_from_transport

Function _query_error_from_transport

sdk/python/src/dagger/_exceptions.py:122–128  ·  view source on GitHub ↗

Create instance from a gql exception.

(exc: TransportQueryError, request: gql.GraphQLRequest)

Source from the content-addressed store, hash-verified

120
121
122def _query_error_from_transport(exc: TransportQueryError, request: gql.GraphQLRequest):
123 """Create instance from a gql exception."""
124 try:
125 errors = cattrs.structure(exc.errors, list[QueryErrorValue])
126 except (TypeError, KeyError, ValueError):
127 return None
128 return QueryError(errors, request) if errors else None
129
130
131class ExecError(QueryError):

Callers 1

executeMethod · 0.90

Calls 2

QueryErrorClass · 0.85
structureMethod · 0.80

Tested by

no test coverage detected