Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BUGFIX: Show the right error message if only child is published #3634

Open
wants to merge 6 commits into
base: 9.0
Choose a base branch
from

Conversation

pKallert
Copy link
Contributor

@pKallert pKallert commented Oct 6, 2023

closes #3633

What I did
I adjusted the message that is output to the user if the parentnode does not exist in the current dimension.

@github-actions github-actions bot added Bug Label to mark the change as bugfix 9.0 labels Oct 6, 2023
@@ -243,6 +244,11 @@ public function publishAction(array $nodeContextPaths, string $targetWorkspaceNa
'Node could not be published, probably because of a missing parentNode. Please check that the parentNode has been published.',
1682762156
);
} catch (NodeAggregateDoesCurrentlyNotCoverDimensionSpacePoint $e) {
throw new NodeAggregateDoesCurrentlyNotCoverDimensionSpacePoint(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for improving the error ;)

I find the pattern of rethrowing the same error class a bit odd. I see that this pattern was used also in the code above and introduced via #3468

But I like to suggest to use a generic RuntimeException and additionally pass the original exception as third parameter for both cases.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had a look and all of the exceptions are domain exceptions, so it would make more sense to rethrow that to me.
Looks like this now:

Bildschirmfoto 2023-12-08 um 09 08 32

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
9.0 Bug Label to mark the change as bugfix
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BUG: Inconsistent error message when publishing childpage after create and copy
3 participants