Skip to content

Commit

Permalink
Merge branch 'pimcore:1.x' into add-all-definitions-button-to-datahub…
Browse files Browse the repository at this point in the history
…-scheme
  • Loading branch information
noahcommandeur-twocream authored Aug 12, 2024
2 parents 053c15d + 8884817 commit fe81eda
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion src/GraphQL/Mutation/MutationType.php
Original file line number Diff line number Diff line change
Expand Up @@ -657,7 +657,19 @@ public function buildDataObjectMutations(&$config = [], $context = [])
}
}

$me->saveElement($newInstance, $args);
try {
$me->saveElement($newInstance, $args);
} catch (DuplicateFullPathException $e) {
return [
'success' => false,
'message' => 'creating failed: Duplicate path',
];
} catch (\Exception $e) {
return [
'success' => false,
'message' => 'creating failed: ' . $e->getMessage(),
];
}

if ($tags) {
$me->setTags('object', $newInstance->getId(), $tags);
Expand Down

0 comments on commit fe81eda

Please sign in to comment.