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

Merged
merged 7 commits into from
Jun 14, 2024

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

@pKallert pKallert requested a review from mhsdesign January 25, 2024 07:28
Copy link
Contributor

@dlubitz dlubitz left a comment

Choose a reason for hiding this comment

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

👍

Copy link
Member

@mhsdesign mhsdesign left a comment

Choose a reason for hiding this comment

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

Can be merged after solving the conflicts ;)

@mhsdesign mhsdesign merged commit a505d45 into neos:9.0 Jun 14, 2024
8 of 9 checks passed
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
4 participants