selfprivacy-rest-api/selfprivacy_api/utils/graphql.py

13 lines
295 B
Python
Raw Permalink Normal View History

from selfprivacy_api.graphql.mutations.mutation_interface import (
GenericJobMutationReturn,
)
def api_job_mutation_error(error: Exception, code: int = 400):
return GenericJobMutationReturn(
success=False,
code=code,
message=str(error),
job=None,
)