From 98f0ec10fc69a21fb6bd3384eb8a40b2e2f44800 Mon Sep 17 00:00:00 2001 From: Inex Code Date: Tue, 23 Jul 2024 17:11:50 +0300 Subject: [PATCH] fix: catch ValueErrors on GraphQL set_service_configuration --- selfprivacy_api/graphql/mutations/services_mutations.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/selfprivacy_api/graphql/mutations/services_mutations.py b/selfprivacy_api/graphql/mutations/services_mutations.py index 91ecaac..704fc96 100644 --- a/selfprivacy_api/graphql/mutations/services_mutations.py +++ b/selfprivacy_api/graphql/mutations/services_mutations.py @@ -187,6 +187,13 @@ class ServicesMutations: code=200, service=service_to_graphql_service(service), ) + except ValueError as e: + return ServiceMutationReturn( + success=False, + message=e.args[0], + code=400, + service=service_to_graphql_service(service), + ) except Exception as e: return ServiceMutationReturn( success=False,